catch
: It must be the last
catch
clause in the
catch
sequence.
N
OTE
N
OTE
In the vast majority of cases you should not use the “catch all” handler as a means of dealing
with exceptions. It is normally better to deal individually with the exceptions that your code can
generate. The inappropriate use of the “catch all” handler can lead to situations in which errors
that would otherwise be caught during testing are masked. It is also difficult to correctly handle
all types of exceptions with a single hander. That said, a “catch all” handler might be appropriate
in certain specialized circumstances, such as in a runtime code analysis tool.
Do'stlaringiz bilan baham: |