4 ms·
>An exception is a signal of uncertainty indicating that you need to learn more about your problem No, that would be a warning. Ab exceprion is a signal someth
by TZubiri 1y ago
>An exception is a signal of uncertainty indicating that you need to learn more about your problem
No, that would be a warning. Ab exceprion is a signal something failed and it was impossible to continue
- nextaccountic 1y agoMany exceptions are recoverable. This sometimes depends on the context, and on how well polished the software is
- TZubiri 1y agoYes. Note how I didn't say impossible to recover, just impossible to continue. The execution couldn't continue in one path due to an error it needed to be caught in another path. The difference with standard conditional mechanisms like if loops is mostly semantical. Exceptions are unforeseen errors, (technically they are sets of errors, which can have size 1, but the syntax is designed for catching groups of errors, if you want to react to a single error case you could also just use a condition with a return value and it ceases being an exception. )