KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > util > logging > LoggingException


1 /*
2 This software is OSI Certified Open Source Software.
3 OSI Certified is a certification mark of the Open Source Initiative.
4
5 The license (Mozilla version 1.0) can be read at the MMBase site.
6 See http://www.MMBase.org/license
7
8 */

9
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 JavaDoc {
22     private Level level;
23
24     //javadoc is inherited
25
public LoggingException () {
26         super();
27     }
28
29     //javadoc is inherited
30
public LoggingException(String JavaDoc message) {
31         super(message);
32     }
33
34     //javadoc is inherited
35
public LoggingException(Throwable JavaDoc cause) {
36         super(cause);
37     }
38
39     //javadoc is inherited
40
public LoggingException(String JavaDoc message, Throwable JavaDoc 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 JavaDoc 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 JavaDoc 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 }
71
Popular Tags