001    /*
002    * Licensed to the Apache Software Foundation (ASF) under one or more
003    * contributor license agreements.  See the NOTICE file distributed with
004    * this work for additional information regarding copyright ownership.
005    * The ASF licenses this file to You under the Apache License, Version 2.0
006    * (the "License"); you may not use this file except in compliance with
007    * the License.  You may obtain a copy of the License at
008    *
009    *     http://www.apache.org/licenses/LICENSE-2.0
010    *
011    * Unless required by applicable law or agreed to in writing, software
012    * distributed under the License is distributed on an "AS IS" BASIS,
013    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014    * See the License for the specific language governing permissions and
015    * limitations under the License.
016    */
017    
018    package javax.servlet.jsp.el;
019    
020    
021    /**
022     * Represents any of the exception conditions that arise during the
023     * operation evaluation of the evaluator.
024     *
025     * @since 2.0
026     * @deprecated
027     */
028    public class ELException
029      extends Exception
030    {
031      //-------------------------------------
032      // Member variables
033      //-------------------------------------
034    
035      private Throwable mRootCause;
036    
037      //-------------------------------------
038      /**
039       * Creates an ELException with no detail message.
040       **/
041      public ELException ()
042      {
043        super ();
044      }
045    
046      //-------------------------------------
047      /**
048       * Creates an ELException with the provided detail message.
049       *
050       * @param pMessage the detail message
051       **/
052      public ELException (String pMessage)
053      {
054        super (pMessage);
055      }
056    
057      //-------------------------------------
058      /**
059       * Creates an ELException with the given root cause.
060       *
061       * @param pRootCause the originating cause of this exception
062       **/
063      public ELException (Throwable pRootCause)
064      {
065        super( pRootCause.getLocalizedMessage() );
066        mRootCause = pRootCause;
067      }
068    
069      //-------------------------------------
070      /**
071       * Creates an ELException with the given detail message and root cause.
072       *
073       * @param pMessage the detail message
074       * @param pRootCause the originating cause of this exception
075       **/
076      public ELException (String pMessage,
077                          Throwable pRootCause)
078      {
079        super (pMessage);
080        mRootCause = pRootCause;
081      }
082    
083      //-------------------------------------
084      /**
085       * Returns the root cause.
086       *
087       * @return the root cause of this exception
088       */
089      public Throwable getRootCause ()
090      {
091        return mRootCause;
092      }
093    }