/*  Copyright (c) 2000, 2001, Oracle Corporation. All Rights Reserved. */

package oracle.portal.utils.v2;

import java.io.PrintStream;
import java.io.PrintWriter;

public class ContainerException extends Exception
{
    private Throwable t = null;

    public ContainerException()
    {
        super();
    }

    public ContainerException(String msg)
    {
        super(msg);
    }

    public ContainerException(Throwable _t)
    {
        t = _t;
    }

    public String getLocalizedMessage()
    {
        if (t != null) return t.getLocalizedMessage();
        else return super.getLocalizedMessage();
    }

    public String getMessage()
    {
        if (t != null) return t.getMessage();
        else return super.getMessage();
    }

    public String toString()
    {
        if (t != null) return t.toString();
        else return super.toString();
    }

    public void printStackTrace()
    {
        if (t != null) t.printStackTrace();
        else super.printStackTrace();
    }

    public void printStackTrace(PrintStream s)
    {
        if (t != null) t.printStackTrace(s);
        else super.printStackTrace(s);
    }

    public void printStackTrace(PrintWriter s)
    {
        if (t != null) t.printStackTrace(s);
        else super.printStackTrace(s);
    }

    public Throwable fillInStackTrace()
    {
        if (t != null) return t.fillInStackTrace();
        else return super.fillInStackTrace();
    }
}
