Modified: separate code for 'define'. was shown unnecessary closing parenthesis.
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / model / ConnectionException.java
1 package com.quantum.model;
2
3 /**
4  * @author BC
5  */
6 public class ConnectionException extends Exception {
7
8     private Throwable cause = null;
9
10     /**
11      * 
12      */
13     public ConnectionException() {
14         super();
15     }
16
17     /**
18      * @param message
19      */
20     public ConnectionException(String message) {
21         super(message);
22     }
23
24     /**
25      * @param message
26      * @param cause
27      */
28     public ConnectionException(String message, Throwable cause) {
29         super(message);
30         this.cause = cause;
31     }
32
33     /**
34      * @param cause
35      */
36     public ConnectionException(Throwable cause) {
37         super(cause.getMessage());
38         this.cause = cause;
39     }
40
41     public Throwable getCause() {
42         return this.cause;
43     }
44
45     public String toString() {
46         String base = super.toString();
47         if (this.cause != null) {
48             base += System.getProperty("line.separator")
49                 + "Root cause:"
50                 + System.getProperty("line.separator")
51                 + this.cause.toString();
52         }
53         return base;
54     }
55
56 }