How do I loop through all the causes of a SQLException?
Location: http://www.jguru.com/faq/view.jsp?EID=1314614 Created: Sep 30, 2006 Author: John Zukowski (http://www.jguru.com/guru/viewbio.jsp?EID=7) You can call the getCause() method of the exception repeatedly try { … } catch (SQLException sqle) { for(Throwable t : sqle) { System.out.println(“Throwable: ” + t); Throwable cause = t.getCause(); while (cause != null) { System.out.println( Cause: + cause); cause = cause.