In the following code two exceptions [FatalException and MyException] are thrown. The Trivial Myexception (overwrites?) Makes the FatalException to be lost. how?
how to handle this situation?
try{
try {
throw new FatalException("Important");
}
finally
{
throw new MyException("trivial");
}
}catch (Exception ex) {
ex.printStackTrace();
}
}
without the catch class for inner try block.
(Article Mentioned its a flaw Exceptions in java!) so there should be someway to overcome it? maybe recent standards changed it?