【发布时间】:2010-10-03 15:29:42
【问题描述】:
是否有一种优雅的方式来处理finally 块中抛出的异常?
例如:
try {
// Use the resource.
}
catch( Exception ex ) {
// Problem with the resource.
}
finally {
try{
resource.close();
}
catch( Exception ex ) {
// Could not close the resource?
}
}
如何避免finally 块中的try/catch?
【问题讨论】:
标签: java exception try-catch finally