3 ms·
> (rather than say catching an exception five frames further down and just appending "mylib: oops"). That is why I like exceptions, so I don't have to explain
by rdtsc 12y ago
> (rather than say catching an exception five frames further down and just appending "mylib: oops").
That is why I like exceptions, so I don't have to explain possible errors like this if I don't have to, but can get a top level exception and see a stacktrace with it. Then choose to add aditional info.
I really like that pattern and use it quite a bit. For example, it is easy to turn code that connect into a piece of code that re-connects with a back-off without having to modify lower layers of the connect call itself (say because it is already in a library).