001    //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/tags/2.1/src/org/deegree/portal/context/ContextException.java $
002    /*
003     * CatalogClientException.java
004     *
005     * Created on 6. November 2003, 22:15
006     */
007    
008    package org.deegree.portal.context;
009    
010    import org.deegree.framework.util.StringTools;
011    
012    
013    
014    /**
015     *
016     * @author  Administrator
017     */
018    public class ContextException extends java.lang.Exception {
019            
020        private String st = "";
021        
022        /**
023         * Creates a new instance of <code>CatalogClientException</code> without detail message.
024         */
025        public ContextException() {
026            st = "ContextException";
027        }
028        
029         
030        /**
031         * Constructs an instance of <code>CatalogClientException</code> with the specified detail message.
032         * @param msg the detail message.
033         */
034        public ContextException(String msg) {
035            super( msg );
036        }
037           
038        /**
039         * Constructs an instance of <code>CatalogClientException</code> with the specified detail message.
040         * @param msg the detail message.
041         */
042        public ContextException(String msg, Exception e) {
043            this( msg );
044            st = StringTools.stackTraceToString( e.getStackTrace() );
045        }
046        
047        /**
048         * @see java.lang.Object#toString()
049         */
050        public String toString() {
051            return super.toString() + "\n" + st;
052        }
053        
054    }
055    /* ********************************************************************
056    Changes to this class. What the people have been up to:
057    $Log$
058    Revision 1.3  2006/07/12 14:46:15  poth
059    comment footer added
060    
061    ********************************************************************** */