3 ms·
> Something relevant to the error condition, probably? And in every language I know you can have catch blocks for specific errors and then have a generic catch
by scarface_74 3y ago
> Something relevant to the error condition, probably?
And in every language I know you can have catch blocks for specific errors and then have a generic catch all.
- simias 3y agoThe ability to catch exceptions is not the issue, it's knowing what to do once they're caught that's the problem. The parent apparently had exhaustive exception handling, catching all cases. A new exception is now generated, probably signaling a new error condition, you can't expect the calling code to be able to handle it gracefully. Hence why a compile error might be a better solution here, the coder could decide whether the new exception can fit an existing handler or requires special handling.