Code: Select all
} catch (HibernateException e) {
loginAnswer = new LoginCustomerAreaAnswer(999);
//This function use the error code save inside loginAnswer
this.logOp.error(logsUtilities.logException(e, "HibernateException"));
} catch (Exception e) {
loginAnswer = new LoginCustomerAreaAnswer(997);
//This function use the error code save inside loginAnswer
this.logOp.error(logsUtilities.logException(e, "Exception"));
} finally {
return loginAnswer;
}
Aber wenn ich in die Protokolldatei schaue und eine org.hibernate.Exception.GenericJDBCException-Ausnahme habe, wird sie wie eine generische Ausnahme abgefangen!
Warum? GenericJDBCException ist nicht „ein Sohn“ von HibernateException? Müsste es nicht von der HibernateException abgefangen werden?
Dies ist ein Beispiel meiner Protokolldatei:
Code: Select all
2013-05-21 11:01:02 [Level: ERROR]*** Exception: Error code: 997 - Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
Mobile version