What's the best way to find out which exceptions may be thrown ?
wjoe
invalid at example.com
Wed May 27 14:03:44 UTC 2020
On Wednesday, 27 May 2020 at 11:40:00 UTC, Mike Parker wrote:
> On Wednesday, 27 May 2020 at 10:30:36 UTC, wjoe wrote:
>> On Wednesday, 27 May 2020 at 10:01:33 UTC, Mike Parker wrote:
>> Could you please elaborate why checked exceptions are more
>> annoying?
>>
>
> For me, it's because they require all functions that touch them
> to either try/catch or include an exception specification in
> its declaration. In my Java days, I ended up just doing what so
> many others do and adding `throws Exception` or
> `catch(Exception)` to avoid having to handle multiple exception
> types. Most of the time, I didn't care what specific sort of
> exception was thrown.
Johannes, Dennis, Mike that was very insightful. I didn't
consider those reasons.
Thank you very much for the elaboration :)
More information about the Digitalmars-d-learn
mailing list