01: /*
02: * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
03: *
04: * http://izpack.org/
05: * http://izpack.codehaus.org/
06: *
07: * Copyright 2008 Ari Voutilainen
08: *
09: * Licensed under the Apache License, Version 2.0 (the "License");
10: * you may not use this file except in compliance with the License.
11: * You may obtain a copy of the License at
12: *
13: * http://www.apache.org/licenses/LICENSE-2.0
14: *
15: * Unless required by applicable law or agreed to in writing, software
16: * distributed under the License is distributed on an "AS IS" BASIS,
17: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18: * See the License for the specific language governing permissions and
19: * limitations under the License.
20: */
21:
22: package IzPack.TestLangPacks;
23:
24: /**
25: * Exception for language pack handling.
26: *
27: * @author Ari Voutilainen
28: */
29: public class LangPackException extends Exception {
30: /**
31: * Severity of the exception.
32: */
33: public enum Severity {
34: /** Exception is information. */
35: INFO,
36: /** Exception is warning. */
37: WARNING,
38: /** Exception is error. */
39: ERROR,
40: /** Exception is fatal error. */
41: FATAL
42: };
43:
44: private int id = 0;
45:
46: /**
47: * The default contructor of the class.
48: */
49: public LangPackException() {
50: }
51:
52: /**
53: * The contructor of the class.
54: * @param msg Message string for the exception.
55: */
56: public LangPackException(String msg) {
57: super (msg);
58: }
59:
60: /**
61: * The contructor of the class.
62: * @param id ID for the exception.
63: */
64: public LangPackException(int id) {
65: this .id = id;
66: }
67:
68: /**
69: * Returns the ID of the exception.
70: */
71: public int GetId() {
72: return id;
73: }
74:
75: public static final long serialVersionUID = 0x29324576;
76: }
|