News for hackers. Stuff that matters.
Re:Why Checked Exceptions Failed by mkleczek on Saturday July 15, 2023 @01:01PM (#36738808)
Yes - that's one of the issues with structured exception handling. Relying only on exception type itself is not enough as information is lost (ie. the actual source of exception)
Re:Why Checked Exceptions Failed by im3w1l on Saturday July 15, 2023 @01:05PM (#36738857)
Crazy idea: Maybe it would be helpful if we could label operations, and catch by either label or type or (label, type). The we could centralize error handling without losing anything.
Re:Why Checked Exceptions Failed by mkleczek on Saturday July 15, 2023 @01:33PM (#36739161)
While deceptive at first... Just try to imagine how "extract method" refactoring would work...
Re:Why Checked Exceptions Failed by im3w1l on Saturday July 15, 2023 @02:22PM (#36739587)
It would have to do some clever rewriting of the logic or it could simply declare that extracting method isn't available on that region. The simplest way to rewrite the logic may be the introduction of new exception type(s) corresponding to the labels.