1 30 31 package de.susebox.jtopas; 32 33 import de.susebox.java.lang.ThrowableList; 37 import de.susebox.java.lang.ThrowableMessageFormatter; 38 39 40 44 55 public class TokenizerException 56 extends Exception 57 implements ThrowableList 58 { 59 63 70 public Throwable getCause() { 71 return _next; 72 } 73 74 81 public Throwable nextThrowable() { 82 return getCause(); 83 } 84 85 92 public boolean isWrapper() { 93 return _isWrapper; 94 } 95 96 103 public String getFormat() { 104 return super.getMessage(); 105 } 106 107 114 public Object [] getArguments() { 115 return _args; 116 } 117 118 119 123 130 public TokenizerException(String msg) { 131 this(null, msg, null); 132 } 133 134 148 public TokenizerException(Throwable ex) { 149 this(ex, null, null); 150 } 151 152 168 public TokenizerException(Throwable ex, String msg) { 169 this(ex, msg, null); 170 } 171 172 187 public TokenizerException(String fmt, Object [] args) { 188 this(null, fmt, args); 189 } 190 191 201 public TokenizerException(Throwable ex, String fmt, Object [] args) { 202 super(fmt); 203 204 if (ex != null && fmt == null) { 205 _isWrapper = true; 206 } else { 207 _isWrapper = false; 208 } 209 _next = ex; 210 _args = args; 211 } 212 213 214 218 226 public String getMessage() { 227 return ThrowableMessageFormatter.getMessage(this); 228 } 229 230 234 237 protected Object [] _args = null; 238 239 242 protected Throwable _next = null; 243 244 249 protected boolean _isWrapper = false; 250 } 251 | Popular Tags |