[your code here]
Ali Çehreli
acehreli at yahoo.com
Thu Jan 31 10:11:18 PST 2013
On 01/31/2013 12:42 AM, Roumen Roupski wrote:
> catch (Throwable ex)
> {
> writefln("File read error: %s", ex.msg);
> return false; // cannot compare the files
Throwable is a little too high in the exception hierarchy:
Throwable
/ \
Error Exception
/ \ / \
A program should catch only Exception and its subtypes. The Error
sub-hierarchy represents errors about the state of the program. The
program state may be so invalid that it is not guaranteed that even
writefln() or 'return' will work.
For the same reason, if it is really an Error that has been thrown, even
the destructors are not called during stack unwinding.
Ali
More information about the Digitalmars-d
mailing list