KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > AssertionFailure


1 //$Id: AssertionFailure.java,v 1.1 2004/06/03 16:30:04 steveebersole Exp $
2
package org.hibernate;
3
4 import org.hibernate.exception.NestableRuntimeException;
5 import org.apache.commons.logging.Log;
6 import org.apache.commons.logging.LogFactory;
7
8 /**
9  * 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.getLog(AssertionFailure.class);
17
18     private static final String JavaDoc MESSAGE = "an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)";
19
20     public AssertionFailure(String JavaDoc s) {
21         super(s);
22         log.error(MESSAGE, this);
23     }
24
25     public AssertionFailure(String JavaDoc s, Throwable JavaDoc t) {
26         super(s, t);
27         log.error(MESSAGE, t);
28     }
29
30 }
31
32
33
34
35
36
37
Popular Tags