November 06, 2014
On 11/06/2014 08:47 AM, Suliman wrote:
>> 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.
>>
>
> Where I can look at hierarchy of exceptions?

The topmost exception class is Throwable:

  http://dlang.org/library/object/Throwable.html

As mentioned there, there are only two descendants of it: Error and Exception.

There is nothing else that can be said beyond that. Any function is free to throw any type as long as it is part of the hierarchy above.

Ali

1 2
Next ›   Last »