Revision 147
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/exception/ListBaseException.java | ||
---|---|---|
218 | 218 |
* @see java.lang.Throwable#getMessage() |
219 | 219 |
*/ |
220 | 220 |
public String getMessage() { |
221 |
return getMessage(0); |
|
222 |
} |
|
223 |
|
|
224 |
public String getMessage(int indent) { |
|
221 | 225 |
String msg = super.getMessage(); |
222 |
Exception bex;
|
|
226 |
Exception ex; |
|
223 | 227 |
Iterator iter=this.exceptions.iterator(); |
224 | 228 |
while (iter.hasNext()) { |
225 |
bex = (Exception) iter.next(); |
|
226 |
msg = msg + "\n " + bex.getMessage(); |
|
229 |
ex = (Exception) iter.next(); |
|
230 |
if( ex instanceof BaseException ) { |
|
231 |
BaseException bex = (BaseException) ex; |
|
232 |
msg = msg + "\n " + insertBlanksAtStart(bex.getMessage(), indent+2) ; |
|
233 |
} else if( ex instanceof BaseRuntimeException ) { |
|
234 |
BaseException bex = (BaseException) ex; |
|
235 |
msg = msg + "\n " + insertBlanksAtStart(bex.getMessage(), indent+2) ; |
|
236 |
} else { |
|
237 |
msg = msg + "\n " + insertBlanksAtStart(ex.getMessage(), indent+2) ; |
|
238 |
} |
|
227 | 239 |
} |
228 | 240 |
return msg; |
229 | 241 |
} |
Also available in: Unified diff