The exception in the try
block gets discarded and forgotten, as specified in the language specification:
- If execution of the
try
block completes abruptly because of a throw
of a value V, then there is a choice:
....
- If the run-time type of V is not assignment compatible with a catchable exception class of any
catch
clause of the try
statement, then the finally
block is executed. Then there is a choice:
- If the
finally
block completes normally, then the try
statement completes abruptly because of a throw
of the value V.
- If the
finally
block completes abruptly for reason S, then the try
statement completes abruptly for reason S (and the throw
of value V is discarded and forgotten).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…