On Friday, October 02, 2015 11:44:19 steven kladitis via Digitalmars-d-learn 
wrote:
> C:\d\examples>pb2
> =>main's first line
>    =>makeOmelet's first line
>      =>prepareAll's first line
>        =>prepareEggs's first line
> object.Exception@pb2.d(64): Cannot take -8 eggs from the fridge
> ----------------
> 0x00402252
> 0x0040512F
> 0x00405043
> 0x00403E48
> 0x7600338A in BaseThreadInitThunk
> 0x77A497F2 in RtlInitializeExceptionChain
> 0x77A497C5 in RtlInitializeExceptionChain
>
>
> ----- I always see the info at the bottom. Is this normal. I was
> thinkig I should only the the exception message itself.
> ---  this is windows 7 32 bit.

If you don't want to see a stack trace, then catch the exception and just
print its msg property. And if you want the file and line number in addition
to the message, then you can access those file the exception's file and line
properties. But the toString function on exceptions is always going to print
out the stack trace in addition to the message, which usually pretty useful,
though in this case, you didn't get the function names as part of the stack
trace, which is less useful. You probably need to build with the debug info
turned on to get it.

- Jonathan M Davis

Reply via email to