1 30 31 package de.susebox.java.io; 32 33 import java.io.IOException ; 37 38 import de.susebox.java.lang.ThrowableList; 39 import de.susebox.java.lang.ThrowableMessageFormatter; 40 41 42 46 53 public class ExtIOException 54 extends IOException 55 implements ThrowableList 56 { 57 61 68 public Throwable getCause() { 69 return _next; 70 } 71 72 79 public Throwable nextThrowable() { 80 return getCause(); 81 } 82 83 90 public boolean isWrapper() { 91 return _isWrapper; 92 } 93 94 101 public String getFormat() { 102 return super.getMessage(); 103 } 104 105 112 public Object [] getArguments() { 113 return _args; 114 } 115 116 117 121 135 public ExtIOException(Throwable ex) { 136 this(ex, null, null); 137 } 138 139 155 public ExtIOException(Throwable ex, String msg) { 156 this(ex, msg, null); 157 } 158 159 174 public ExtIOException(String fmt, Object [] args) { 175 this(null, fmt, args); 176 } 177 178 189 public ExtIOException(Throwable ex, String fmt, Object [] args) { 190 super(fmt); 191 192 if (ex != null && fmt == null) { 193 _isWrapper = true; 194 } else { 195 _isWrapper = false; 196 } 197 _next = ex; 198 _args = args; 199 } 200 201 202 206 214 public String getMessage() { 215 return ThrowableMessageFormatter.getMessage(this); 216 } 217 218 219 223 226 protected Object [] _args = null; 227 228 231 protected Throwable _next = null; 232 233 238 protected boolean _isWrapper = false; 239 } 240 | Popular Tags |