01: //$Id: AssertionFailure.java 3890 2004-06-03 16:31:32Z steveebersole $
02: package org.hibernate;
03:
04: import org.hibernate.exception.NestableRuntimeException;
05: import org.apache.commons.logging.Log;
06: import org.apache.commons.logging.LogFactory;
07:
08: /**
09: * Indicates failure of an assertion: a possible bug in Hibernate.
10: *
11: * @author Gavin King
12: */
13:
14: public class AssertionFailure extends NestableRuntimeException {
15:
16: private static final Log log = LogFactory
17: .getLog(AssertionFailure.class);
18:
19: private static final String MESSAGE = "an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)";
20:
21: public AssertionFailure(String s) {
22: super (s);
23: log.error(MESSAGE, this );
24: }
25:
26: public AssertionFailure(String s, Throwable t) {
27: super(s, t);
28: log.error(MESSAGE, t);
29: }
30:
31: }
|