KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > maven > project > interpolation > ModelInterpolationException


1 package org.apache.maven.project.interpolation;
2
3 /*
4  * Copyright 2001-2005 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 /**
20  * @author jdcasey
21  * <p/>
22  * Created on Feb 2, 2005
23  */

24 public class ModelInterpolationException
25     extends Exception JavaDoc
26 {
27     private String JavaDoc expression;
28
29     private String JavaDoc originalMessage;
30
31     public ModelInterpolationException( String JavaDoc message )
32     {
33         super( message );
34     }
35
36     public ModelInterpolationException( String JavaDoc message, Throwable JavaDoc cause )
37     {
38         super( message, cause );
39     }
40
41     public ModelInterpolationException( String JavaDoc expression, String JavaDoc message, Throwable JavaDoc cause )
42     {
43         super( "The POM expression: " + expression + " could not be evaluated. Reason: " + message, cause );
44
45         this.expression = expression;
46         this.originalMessage = message;
47     }
48
49     public ModelInterpolationException( String JavaDoc expression, String JavaDoc message )
50     {
51         super( "The POM expression: " + expression + " could not be evaluated. Reason: " + message );
52
53         this.expression = expression;
54         this.originalMessage = message;
55     }
56
57     public String JavaDoc getExpression()
58     {
59         return expression;
60     }
61
62     public String JavaDoc getOriginalMessage()
63     {
64         return originalMessage;
65     }
66
67 }
Popular Tags