util/src/main/java/org/apache/directory/api/util/exception/MultiException.java [70:186]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public Iterator<Throwable> listNestedExceptions()
    {
        return nestedExceptions.iterator();
    }


    /**
     * Gets the size of this nested exception which equals the number of
     * exception nested within.
     * 
     * @return the size of this nested exception.
     */
    public int size()
    {
        return nestedExceptions.size();
    }


    /**
     * Tests to see if there are any nested exceptions within this
     * MultiException.
     * 
     * @return true if no exceptions are nested, false otherwise.
     */
    public boolean isEmpty()
    {
        return nestedExceptions.isEmpty();
    }


    /**
     * Add an exception to this multiexception.
     * 
     * @param nested exception to add to this MultiException.
     */
    public void addThrowable( Throwable nested )
    {
        nestedExceptions.add( nested );
    }


    // ///////////////////////////////////////////
    // Overriden Throwable Stack Trace Methods //
    // ///////////////////////////////////////////

    /**
     * Beside printing out the standard stack trace this method prints out the
     * stack traces of all the nested exceptions.
     * 
     * @param out PrintWriter to write the nested stack trace to.
     */
    @Override
    public void printStackTrace( PrintWriter out )
    {
        super.printStackTrace( out );

        out.println( "Nested exceptions to follow:\n" );
        boolean isFirst = true;

        for ( Throwable throwable : nestedExceptions )
        {
            if ( isFirst )
            {
                isFirst = false;
            }
            else
            {
                out.println( "\n\t<<========= Next Nested Exception" + " ========>>\n" );
            }

            throwable.printStackTrace( out );
        }

        out.println( "\n\t<<========= Last Nested Exception" + " ========>>\n" );
    }


    /**
     * Beside printing out the standard stack trace this method prints out the
     * stack traces of all the nested exceptions.
     * 
     * @param out PrintStream to write the nested stack trace to.
     */
    @Override
    public void printStackTrace( PrintStream out )
    {
        super.printStackTrace( out );

        out.println( "Nested exceptions to follow:\n" );
        boolean isFirst = true;

        for ( Throwable throwable : nestedExceptions )
        {
            if ( isFirst )
            {
                isFirst = false;
            }
            else
            {
                out.println( "\n\t<<========= Next Nested Exception" + " ========>>\n" );
            }

            throwable.printStackTrace( out );
        }

        out.println( "\n\t<<========= Last Nested Exception" + " ========>>\n" );
    }


    /**
     * Beside printing out the standard stack trace this method prints out the
     * stack traces of all the nested exceptions using standard error.
     */
    @Override
    public void printStackTrace()
    {
        this.printStackTrace( System.err );
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



util/src/main/java/org/apache/directory/api/util/exception/RuntimeMultiException.java [83:197]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public Iterator<Throwable> listNestedExceptions()
    {
        return nestedExceptions.iterator();
    }


    /**
     * Gets the size (number of) exceptions nested within this exception.
     * 
     * @return the size of this nested exception.
     */
    public int size()
    {
        return nestedExceptions.size();
    }


    /**
     * Tests to see if exceptions are nested within this exception.
     * 
     * @return true if an exception is nested, false otherwise
     */
    public boolean isEmpty()
    {
        return nestedExceptions.isEmpty();
    }


    /**
     * Add an exeception to this multiexception.
     * 
     * @param nested exception to add to this MultiException.
     */
    public void addThrowable( Throwable nested )
    {
        nestedExceptions.add( nested );
    }


    // ///////////////////////////////////////////
    // Overriden Throwable Stack Trace Methods //
    // ///////////////////////////////////////////

    /**
     * Beside printing out the standard stack trace this method prints out the
     * stack traces of all the nested exceptions.
     * 
     * @param out PrintWriter to write the nested stack trace to.
     */
    @Override
    public void printStackTrace( PrintWriter out )
    {
        super.printStackTrace( out );

        out.println( "Nested exceptions to follow:\n" );
        boolean isFirst = true;

        for ( Throwable throwable : nestedExceptions )
        {
            if ( isFirst )
            {
                isFirst = false;
            }
            else
            {
                out.println( "\n\t<<========= Next Nested Exception" + " ========>>\n" );
            }

            throwable.printStackTrace( out );
        }

        out.println( "\n\t<<========= Last Nested Exception" + " ========>>\n" );
    }


    /**
     * Beside printing out the standard stack trace this method prints out the
     * stack traces of all the nested exceptions.
     * 
     * @param out PrintStream to write the nested stack trace to.
     */
    @Override
    public void printStackTrace( PrintStream out )
    {
        super.printStackTrace( out );

        out.println( "Nested exceptions to follow:\n" );
        boolean isFirst = true;

        for ( Throwable throwable : nestedExceptions )
        {
            if ( isFirst )
            {
                isFirst = false;
            }
            else
            {
                out.println( "\n\t<<========= Next Nested Exception" + " ========>>\n" );
            }

            throwable.printStackTrace( out );
        }

        out.println( "\n\t<<========= Last Nested Exception" + " ========>>\n" );
    }


    /**
     * Beside printing out the standard stack trace this method prints out the
     * stack traces of all the nested exceptions using standard error.
     */
    @Override
    public void printStackTrace()
    {
        this.printStackTrace( System.err );
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



