Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I loop through all the causes of a SQLException?

causes loop SQLException
0
Posted

How do I loop through all the causes of a SQLException?

0

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123