01: /*-
02: * See the file LICENSE for redistribution information.
03: *
04: * Copyright (c) 2002,2008 Oracle. All rights reserved.
05: *
06: * $Id: DatabaseException.java,v 1.21.2.2 2008/01/07 15:14:08 cwl Exp $
07: */
08:
09: package com.sleepycat.je;
10:
11: /**
12: * Javadoc for this public class is generated
13: * via the doc templates in the doc_src directory.
14: */
15: public class DatabaseException extends Exception {
16: public DatabaseException() {
17: super ();
18: }
19:
20: public DatabaseException(Throwable t) {
21: super (t);
22: }
23:
24: public DatabaseException(String message) {
25: super (getVersionHeader() + message);
26: }
27:
28: public DatabaseException(String message, Throwable t) {
29: super ((getVersionHeader() + message), t);
30: }
31:
32: /* Public for unit tests. */
33: public static String getVersionHeader() {
34: return "(JE " + JEVersion.CURRENT_VERSION + ") ";
35: }
36: }
|