digitalmars.D - Re: Renaming std.conv
- Sean Kelly <sean invisibleduck.org> Jun 28 2010
- "Rory McGuire" <rmcguire neonova.co.za> Jun 28 2010
- Sean Kelly <sean invisibleduck.org> Jun 28 2010
- "Rory McGuire" <rmcguire neonova.co.za> Jun 28 2010
Andrei Alexandrescu Wrote:We haven't reached consensus on where to put enforce() and friends. Any other ideas? Of the above, I like std.checks. Better yet, how about defining std.exception that includes a host of exception-related functionality (such as defining exceptions that retain file and line, perhaps stack traces etc.)?
The trace functionality already exists in druntime. As for exceptions, they may belong there as well if they're ones the runtime should be aware of.
Jun 28 2010
On Mon, 28 Jun 2010 17:36:15 +0200, Sean Kelly <sean invisibleduck.org> wrote:Andrei Alexandrescu Wrote:We haven't reached consensus on where to put enforce() and friends. Any other ideas? Of the above, I like std.checks. Better yet, how about defining std.exception that includes a host of exception-related functionality (such as defining exceptions that retain file and line, perhaps stack traces etc.)?
The trace functionality already exists in druntime. As for exceptions, they may belong there as well if they're ones the runtime should be aware of.
How does one get a print out of the stack trace then? Is it a setting or something?
Jun 28 2010
Rory McGuire Wrote:On Mon, 28 Jun 2010 17:36:15 +0200, Sean Kelly <sean invisibleduck.org> wrote:Andrei Alexandrescu Wrote:We haven't reached consensus on where to put enforce() and friends. Any other ideas? Of the above, I like std.checks. Better yet, how about defining std.exception that includes a host of exception-related functionality (such as defining exceptions that retain file and line, perhaps stack traces etc.)?
The trace functionality already exists in druntime. As for exceptions, they may belong there as well if they're ones the runtime should be aware of.
How does one get a print out of the stack trace then? Is it a setting or something?
I should qualify my original statement by saying that it's only implemented for Linux and OSX so far. I have some of the declarations in for the Windows implementation but haven't gotten to it yet.
Jun 28 2010
Sean Kelly wrote:Rory McGuire Wrote:On Mon, 28 Jun 2010 17:36:15 +0200, Sean Kelly <sean invisibleduck.org> wrote:Andrei Alexandrescu Wrote:We haven't reached consensus on where to put enforce() and friends. Any other ideas? Of the above, I like std.checks. Better yet, how about defining std.exception that includes a host of exception-related functionality (such as defining exceptions that retain file and line, perhaps stack traces etc.)?
they may belong there as well if they're ones the runtime should be aware of.
something?
I should qualify my original statement by saying that it's only implemented for Linux and OSX so far. I have some of the declarations in for the Windows implementation but haven't gotten to it yet.
My stack traces look indecipherable on Ubuntu. They only contain module name and memory address. Andrei
Jun 28 2010
On Mon, 28 Jun 2010 18:01:55 +0200, Sean Kelly <sean invisibleduck.org> wrote:Rory McGuire Wrote:On Mon, 28 Jun 2010 17:36:15 +0200, Sean Kelly <sean invisibleduck.org> wrote:Andrei Alexandrescu Wrote:We haven't reached consensus on where to put enforce() and friends.
other ideas? Of the above, I like std.checks. Better yet, how about defining std.exception that includes a host of exception-related functionality (such as defining exceptions that
file and line, perhaps stack traces etc.)?
The trace functionality already exists in druntime. As for
they may belong there as well if they're ones the runtime should be aware of.
How does one get a print out of the stack trace then? Is it a setting or something?
I should qualify my original statement by saying that it's only implemented for Linux and OSX so far. I have some of the declarations in for the Windows implementation but haven't gotten to it yet.
Is there a way to get the function name/line? I'm using this on ubuntu 10.04. void fun() { throw new Exception("eeek"); } void main() { fun(); } Output is: object.Exception: eeek ---------------- ../throw() [0x80493a0] ../throw() [0x804ba44] ../throw() [0x804b9a9] ../throw() [0x804ba81] ../throw() [0x804b9a9] ../throw() [0x804b958] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xf764cbd6] ../throw() [0x80492b1] -Rory
Jun 28 2010