Exception "error" message without stacktrace

Andrej Mitrovic andrej.mitrovich at gmail.com
Tue Mar 25 07:47:36 PDT 2014


On Tuesday, 25 March 2014 at 14:43:18 UTC, Spacen Jasset wrote:
> I caught a FileException, and want to print out the descriptive 
> error, but not the stacktrace.

Try writing the exception's 'msg' field (it's a string).

There is also 'file' and 'line'. See the class Throwable (in 
object.d or object.di) and the FileException class in std.file 
(it has some additional fields like errno).


More information about the Digitalmars-d-learn mailing list