~hudson-ubuntu/+junk/hudson-jexl

« back to all changes in this revision

Viewing changes to src/java/org/apache/commons/jexl/JexlException.java

  • Committer: James Page
  • Date: 2011-01-18 18:03:16 UTC
  • Revision ID: james.page@canonical.com-20110118180316-zl0h9qww7s8box16
InitialĀ releaseĀ 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2002-2006 The Apache Software Foundation.
 
3
 *
 
4
 * Licensed under the Apache License, Version 2.0 (the "License");
 
5
 * you may not use this file except in compliance with the License.
 
6
 * You may obtain a copy of the License at
 
7
 *
 
8
 *      http://www.apache.org/licenses/LICENSE-2.0
 
9
 *
 
10
 * Unless required by applicable law or agreed to in writing, software
 
11
 * distributed under the License is distributed on an "AS IS" BASIS,
 
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
13
 * See the License for the specific language governing permissions and
 
14
 * limitations under the License.
 
15
 */
 
16
package org.apache.commons.jexl;
 
17
 
 
18
/**
 
19
 * Signals an error inside JEXL.
 
20
 *
 
21
 * @author Kohsuke Kawaguchi
 
22
 */
 
23
public class JexlException extends Exception {
 
24
    private Throwable cause;
 
25
 
 
26
    public JexlException(String message) {
 
27
        this(message,null);
 
28
    }
 
29
 
 
30
    public JexlException(String message, Throwable cause) {
 
31
        super(message);
 
32
        this.cause = cause;
 
33
    }
 
34
 
 
35
    public JexlException(Throwable cause) {
 
36
        this(cause.getMessage(),cause);
 
37
    }
 
38
 
 
39
    public Throwable getCause() {
 
40
        return cause;
 
41
    }
 
42
}