On 11/05/2014 11:02 PM, Suliman wrote:
Replace that with something like writeln("caught") and you will see
that it is indeed caught. :) Printing the exception mimicks the
default behavior and you (and I) think that the exception is not
caught. :)

that's work, but I can not understand where I can to look at exception
level. If I right understand every function have own exceptions. For
example std.file.
Where I could look at what "e" will get? I mean "catch(Exception e)".


We have to look at the documentation of the function. In this case the possibilities are FileException and UTFException.

  http://dlang.org/phobos/std_file.html#.readText

However, judging by their names, they are both descendants of Exception, so what you are doing will catch either of them.

Ali

Reply via email to