3 ms·
> If you don't have a try/catch immediately around the throw, say at a higher level of where the function was called or, in the "worst" case, in the main body b
by jcelerier 4y ago
> If you don't have a try/catch immediately around the throw, say at a higher level of where the function was called or, in the "worst" case, in the main body block, then the handling becomes hard to reason about.
what exactly do you call "hard to reason about" ? if it's an exception most likely the library itself has no business handling it and should just let it propagate to the user of the library.
- Brian_K_White 4y agoI don't want to be the user of a library that might do something even the library itself doesn't know why it happened. Your point seems to be that any exeption that makes it to the top must by simple definition of reaching that point, have been something the user did or in some other way "not my problem", which I think is ridiculous. The whole article starts with the assertion that they want this library to be solid not slapdash.