View Javadoc
1   /* ---------------------------------------------------------------------------------------
2    * Class:  com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.AbaRouteValidationException.java
3    * Date:   2015/04/15
4    * ---------------------------------------------------------------------------------------
5    *
6    *  License: Apache 2.0
7    *
8    *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
9    *  this file except in compliance with the License.
10   *
11   *  You may obtain a copy of the License at
12   *
13   *    http://www.apache.org/licenses/LICENSE-2.0
14   *
15   *  Unless required by applicable law or agreed to in writing, software distributed under
16   *  the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
17   *  OF ANY KIND, either express or implied including the implied warranties of
18   *  merchantability and fitness for a particular purpose.
19   *
20   *  See the License for the specific language governing permissions and
21   *  limitations under the License.
22   */
23  
24  package com.cardatechnologies.utils.validators.abaroutevalidator.exceptions;
25  
26  /**
27   * <b>Description:</b><br>
28   *     This class is used throwing error messages relating to the ABA Routing code.
29   *
30   * @author     Daniel Carda
31   * <br>
32   * <br><b>Maintenance History:</b>
33   * <br>
34  <pre>
35      yyyy mm dd  Who                       Description
36  ----------  ------------------------  ----------------------------------------------------
37      2015/04/15  Daniel Carda              Initial Module Creation...
38      2020/12/22  Daniel Carda              Improved internal error handling.
39      2021/08/01  Daniel Carda              Improved Class Javadocs
40  </pre>
41   * <hr>
42   */
43  public class AbaRouteValidationException
44          extends Exception {
45  
46      private String errorMessage;
47      private int    errorCode;
48  
49      /**
50       * Constructs ...
51       *
52       * @param cause
53       *        Throwable reason.
54       */
55      public AbaRouteValidationException( Throwable cause ) {
56          super( cause );
57      }
58  
59      /**
60       * Constructs ...
61       *
62       * @param errorCode
63       *        The integer code associated with this error.
64       * @param errorMessage
65       *        A textual message about the error.
66       */
67      public AbaRouteValidationException( final int    errorCode,
68                                          final String errorMessage ) {
69          super( errorMessage );
70  
71          //
72          this.errorCode    = errorCode;
73          this.errorMessage = errorMessage;
74      }
75  
76      /**
77       * Method: getErrorCode
78       *
79       * @return int
80       *         The integer code associated with this error.
81       */
82      public int getErrorCode() {
83          return errorCode;
84      }
85  
86      /**
87       * Method: setErrorCode
88       *
89       * @param errorCode
90       *        The integer code associated with this error.
91       */
92      public void setErrorCode( int errorCode ) {
93          this.errorCode = errorCode;
94      }
95  
96      /**
97       * Method: getErrorMessage
98       *
99       * @return String
100      *         A text description of the error.
101      */
102     public String getErrorMessage() {
103         return errorMessage;
104     }
105 
106     /**
107      * Method: setErrorMessage
108      *
109      * @param errorMessage
110      *        A textual message about the error.
111      */
112     public void setErrorMessage( String errorMessage ) {
113         this.errorMessage = errorMessage;
114     }
115 }
116 
117 /* ---------------------------------------------------------------------------------------
118  *  License: Apache 2.0
119  *
120  *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
121  *  this file except in compliance with the License.
122  *
123  *  You may obtain a copy of the License at
124  *
125  *    http://www.apache.org/licenses/LICENSE-2.0
126  *
127  *  Unless required by applicable law or agreed to in writing, software distributed under
128  *  the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
129  *  OF ANY KIND, either express or implied including the implied warranties of
130  *  merchantability and fitness for a particular purpose.
131  *
132  *  See the License for the specific language governing permissions and
133  *  limitations under the License.
134  *
135  * ---------------------------------------------------------------------------------------
136  * Class:  com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.AbaRouteValidationException.java
137  * Date:   2015/04/15
138  * --------------------------------------------------------------------------------------- */