01: /*
02: JOpenChart Java Charting Library and Toolkit
03: Copyright (C) 2001 Sebastian Müller
04: http://jopenchart.sourceforge.net
05:
06: This library is free software; you can redistribute it and/or
07: modify it under the terms of the GNU Lesser General Public
08: License as published by the Free Software Foundation; either
09: version 2.1 of the License, or (at your option) any later version.
10:
11: This library is distributed in the hope that it will be useful,
12: but WITHOUT ANY WARRANTY; without even the implied warranty of
13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: Lesser General Public License for more details.
15:
16: You should have received a copy of the GNU Lesser General Public
17: License along with this library; if not, write to the Free Software
18: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19:
20: EncodingException.java
21: Created on 28. Januar 2002, 21:32
22: */
23:
24: package de.progra.charting;
25:
26: /**
27: * This class encapsulates all image encoding exceptions.
28: * @author mueller
29: */
30: public class EncodingException extends java.lang.Exception {
31:
32: private Throwable cause;
33:
34: /**
35: * Creates a new instance of <code>EncodingException</code> without detail message.
36: */
37: public EncodingException() {
38: }
39:
40: /**
41: * Constructs an instance of <code>EncodingException</code> with the specified detail message.
42: * @param msg the detail message.
43: */
44: public EncodingException(String msg) {
45: super (msg);
46: }
47:
48: /**
49: * Constructs an instance of <code>EncodingException</code> with the specified detail message
50: * and the specified cause.
51: * @param msg the detail message.
52: * @param cause the Throwable that caused this Exception
53: */
54: public EncodingException(String msg, Throwable cause) {
55: super (msg);
56: this .cause = cause;
57: }
58:
59: /** Returns the Throwable that caused the Exception to be thrown. */
60: public Throwable getCause() {
61: return cause;
62: }
63: }
|