01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //
09: // This file is part of KeY - Integrated Deductive Software Design
10: // Copyright (C) 2001-2004 Universitaet Karlsruhe, Germany
11: // Universitaet Koblenz-Landau, Germany
12: // Chalmers University of Technology, Sweden
13: //
14: // The KeY system is protected by the GNU General Public License.
15: // See LICENSE.TXT for details.
16: package de.uka.ilkd.key.util.install;
17:
18: import java.io.PrintWriter;
19: import java.io.StringWriter;
20:
21: public class KeYInstallerException extends Exception {
22:
23: private Exception e;
24:
25: public KeYInstallerException(String msg) {
26: super (msg);
27: }
28:
29: public KeYInstallerException(String msg, Exception e) {
30: super (msg);
31: this .e = e;
32: }
33:
34: public String getLocalizedMessage() {
35: StringWriter sw = new StringWriter();
36: if (e != null) {
37: e.printStackTrace(new PrintWriter(sw));
38: }
39: return sw.getBuffer() + super .getLocalizedMessage();
40:
41: }
42:
43: public String toString() {
44: return getLocalizedMessage();
45: }
46:
47: }
|