Renaming std.conv

Rory McGuire rmcguire at neonova.co.za
Mon Jun 28 11:20:51 PDT 2010


On Mon, 28 Jun 2010 18:01:55 +0200, Sean Kelly <sean at invisibleduck.org>  
wrote:

> Rory McGuire Wrote:
>
>> On Mon, 28 Jun 2010 17:36:15 +0200, Sean Kelly <sean at 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.

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


More information about the Digitalmars-d mailing list