StringBuffer msg = new StringBuffer();
Throwable[] exceptions = txnValException.getExceptions();
for(Throwable e : exceptions){
JboException je = (JboException)e;
msg.append( je.getMessage() );
Throwable[] nes = je.getExceptions();
for(Throwable ne : nes){
msg.append(" (").append(ne.getMessage()).append(") ");
}
msg.append( "\r\n" );
}
System.out.println(msg.toString());
Ahora bien, un ejercicio interesante es ver el API de cada tipo de excepción que contiene, ya que tiene la información sobre la que la fila y sus atributos que han originado el error.
- FIN -
No comments:
Post a Comment