View Javadoc
1   /* ---------------------------------------------------------------------------------------
2    * Class:  com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.AbaRouteValidationException.java
3    * Date:   2015/04/15
4    * ---------------------------------------------------------------------------------------
5    * Copyright:  Daniel Carda
6    *             All Rights Reserved
7    * ---------------------------------------------------------------------------------------
8    *
9    *  License: MIT license
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
12   * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANT ABILITY, FITNESS FOR A
13   * PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
14   * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
15   * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
16   * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17   */
18  
19  package com.cardatechnologies.utils.validators.abaroutevalidator.exceptions;
20  
21  /**
22   * <b>Description:</b><br>
23   *     This class is used throwing error messages relating to the ABA Routing code.
24   *
25   * @author     Daniel Carda
26   * <br>
27   * <br><b>Maintenance History:</b>
28   * <br>
29  <pre>
30      yyyy mm dd  Who                       Description
31      ----------  ------------------------  ----------------------------------------------------
32      2015/04/15  Daniel Carda              Initial Module Creation...
33      2020/12/22  Daniel Carda              Improved internal error handling.
34      2021/08/01  Daniel Carda              Improved Class Javadocs
35  </pre>
36   * <hr>
37   */
38  public class AbaRouteValidationException
39          extends Exception {
40  
41      private String errorMessage;
42      private int    errorCode;
43  
44      /**
45       * Constructs ...
46       *
47       * @param cause
48       *        Throwable reason.
49       */
50      public AbaRouteValidationException( Throwable cause ) {
51          super( cause );
52      }
53  
54      /**
55       * Constructs ...
56       *
57       * @param errorCode
58       *        The integer code associated with this error.
59       * @param errorMessage
60       *        A textual message about the error.
61       */
62      public AbaRouteValidationException( final int    errorCode,
63                                          final String errorMessage ) {
64          super( errorMessage );
65  
66          //
67          this.errorCode    = errorCode;
68          this.errorMessage = errorMessage;
69      }
70  
71      /**
72       * Method: getErrorCode
73       *
74       * @return int
75       *         The integer code associated with this error.
76       */
77      public int getErrorCode() {
78          return errorCode;
79      }
80  
81      /**
82       * Method: setErrorCode
83       *
84       * @param errorCode
85       *        The integer code associated with this error.
86       */
87      public void setErrorCode( int errorCode ) {
88          this.errorCode = errorCode;
89      }
90  
91      /**
92       * Method: getErrorMessage
93       *
94       * @return String
95       *         A text description of the error.
96       */
97      public String getErrorMessage() {
98          return errorMessage;
99      }
100 
101     /**
102      * Method: setErrorMessage
103      *
104      * @param errorMessage
105      *        A textual message about the error.
106      */
107     public void setErrorMessage( String errorMessage ) {
108         this.errorMessage = errorMessage;
109     }
110 }
111 
112 /* ---------------------------------------------------------------------------------------
113  * Class:  com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.AbaRouteValidationException.java
114  * Date:   2015/04/15
115  * --------------------------------------------------------------------------------------- */