1 6 package org.xml.sax; 7 8 37 public class SAXException extends Exception { 38 39 40 43 public SAXException () 44 { 45 super(); 46 this.exception = null; 47 } 48 49 50 55 public SAXException (String message) { 56 super(message); 57 this.exception = null; 58 } 59 60 61 70 public SAXException (Exception e) 71 { 72 super(); 73 this.exception = e; 74 } 75 76 77 86 public SAXException (String message, Exception e) 87 { 88 super(message); 89 this.exception = e; 90 } 91 92 93 102 public String getMessage () 103 { 104 String message = super.getMessage(); 105 106 if (message == null && exception != null) { 107 return exception.getMessage(); 108 } else { 109 return message; 110 } 111 } 112 113 114 119 public Exception getException () 120 { 121 return exception; 122 } 123 124 125 130 public String toString () 131 { 132 if (exception != null) { 133 return exception.toString(); 134 } else { 135 return super.toString(); 136 } 137 } 138 139 140 141 145 146 149 private Exception exception; 150 151 static final long serialVersionUID = 583241635256073760L; 153 } 154 155 | Popular Tags |