01: /*
02: This software is OSI Certified Open Source Software.
03: OSI Certified is a certification mark of the Open Source Initiative.
04:
05: The license (Mozilla version 1.0) can be read at the MMBase site.
06: See http://www.MMBase.org/license
07:
08: */
09:
10: package org.mmbase.util.logging;
11:
12: /**
13: * Exceptions thrown by logging can be wrapped in this. Odd logging
14: * implementation like 'ExceptionImpl' do this.
15: *
16: * @author Michiel Meeuwissen
17: * @since MMBase-1.7
18: * @see ExceptionImpl
19: */
20:
21: public class LoggingException extends RuntimeException {
22: private Level level;
23:
24: //javadoc is inherited
25: public LoggingException() {
26: super ();
27: }
28:
29: //javadoc is inherited
30: public LoggingException(String message) {
31: super (message);
32: }
33:
34: //javadoc is inherited
35: public LoggingException(Throwable cause) {
36: super (cause);
37: }
38:
39: //javadoc is inherited
40: public LoggingException(String message, Throwable cause) {
41: super (message, cause);
42: }
43:
44: /**
45: * Create the exception.
46: * @param message a description of the exception
47: * @param level the level of logging at which the exception occurred
48: */
49: public LoggingException(String message, Level level) {
50: super (message);
51: this .level = level;
52: }
53:
54: /**
55: * Create the exception.
56: * @param cause the cause of the exception
57: * @param level the level of logging at which the exception occurred
58: */
59: public LoggingException(Throwable cause, Level level) {
60: super (cause);
61: this .level = level;
62: }
63:
64: /**
65: * Returns the level of logging at which the exception occurred
66: */
67: public Level getLevel() {
68: return level;
69: }
70: }
|