改进的例外处理 try i catch(SQLException ex)t for(Throwable t eX System. err. println(t Throwable cause =t. getCause ()i while(cause ! null)( System. err println("cause t cause)i cause cause. getcause()i改进的例外处理 try { … } catch(SQLException ex) { for(Throwable t : ex) { System.err.println(t); Throwable cause = t.getCause(); while(cause != null) { System.err.println("Cause: " + cause); cause = cause.getCause(); } } }