package org.jpos.iso;

/**
 * Signals that an ISO exception of some sort has occurred. 
 *
 * @author  apr@cs.com.uy
 * @version $Id$
 */
public
class ISOException extends Exception {
    /**
     * Constructs an <code>ISOException</code> with no detail message. 
     */
    public ISOException() {
        super();
    }

    /**
     * Constructs an <code>ISOException</code> with the specified detail 
     * message. 
     *
     * @param   s   the detail message.
     */
    public ISOException(String s) {
        super(s);
    }
}

@@ -16,16 +16,77 @@
 s.iso;%0A%0A
+import java.io.PrintStream;%0Aimport org.jpos.util.Loggeable;%0A%0A
 /**%0A * S
@@ -161,37 +161,92 @@
 or  
-apr@cs.com.uy%0A * @version $Id
+%3Ca href=%22mailto:apr@cs.com.uy%22%3EAlejandro P. Revilla%3C/a%3E%0A * @version $Revision$ $Date
 $%0A *
@@ -253,17 +253,17 @@
 /%0Apublic
-%0A
+ 
 class IS
@@ -291,17 +291,67 @@
 ception 
-%7B
+implements Loggeable %7B%0A    Exception nested = null;
 %0A    /**
@@ -696,11 +696,1161 @@
 );%0A    %7D
+%0A%0A    /**%0A     * Constructs an %3Ccode%3EISOException%3C/code%3E with a nested%0A     * exception%0A     * @param nested another exception%0A     */%0A    public ISOException (Exception nested) %7B%0A%09super(nested.toString());%0A%09this.nested = nested;%0A    %7D%0A%0A    /**%0A     * Constructs an %3Ccode%3EISOException%3C/code%3E with a detail Message nested%0A     * exception%0A     * @param   s   the detail message.%0A     * @param nested another exception%0A     */%0A    public ISOException (String s, Exception nested) %7B%0A%09super(s);%0A%09this.nested = nested;%0A    %7D%0A%0A    /**%0A     * @return nested exception (may be null)%0A     */%0A    public Exception getNested() %7B%0A%09return nested;%0A    %7D%0A%0A    public void dump (PrintStream p, String indent) %7B%0A%09String inner = indent + %22  %22;%0A%09p.println (indent + %22%3Cisoexception%3E%22);%0A%09p.println (inner  + getMessage());%0A%09if (nested != null) %7B%0A%09    if (nested instanceof ISOException) %0A%09%09((ISOException)nested).dump (p, inner);%0A%09    else %7B%0A%09%09p.println (inner + %22%3Cnested-exception%3E%22%0A%09%09                 +nested.getMessage()%0A%09%09                 + %22%3C/nested-exception%3E%22%0A%09%09%09  );%0A%09    %7D%0A%09%7D%0A%09p.print (inner);%0A%09printStackTrace (p);%0A%09p.println (indent + %22%3C/isoexception%3E%22);%0A    %7D
 %0A%7D%0A

Support nested exceptions, implement Loggeable