| Total Complexity | 2 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | package com.base.Exceptions; |
||
| 3 | public class BaseException extends Exception { |
||
| 4 | |||
| 5 | /** |
||
| 6 | * Construct {@link BaseException} |
||
| 7 | */ |
||
| 8 | public BaseException() { |
||
| 9 | super("Error (500): Something went wrong."); |
||
| 10 | } |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Construct {@link BaseException} with status code and Error Message |
||
| 14 | * @param code Error Code |
||
| 15 | * @param error Error Message |
||
| 16 | */ |
||
| 17 | public BaseException(int code, String error) { |
||
| 18 | super("Error ("+ code +"): " + error); |
||
| 19 | } |
||
| 22 |