}
catch (Exception e)
{
Throwable t = Utilities.getDeepestThrowable(e);
ExceptionFormatter formatter = _sess.getExceptionFormatter();
String message = formatter.format(t);
_sess.showErrorMessage(message);
if (_sess.getProperties().getWriteSQLErrorsToLog() ||
(-1 == t.getClass().getName().toLowerCase().indexOf("hibernate") && -1 == t.getClass().getName().toLowerCase().indexOf("antlr")))
{