com.sap.ipe.ble.irp.exceptions.ExtensionException Maven / Gradle / Ivy
package com.sap.ipe.ble.irp.exceptions;
/***
*ExtensionException is used to handle custom exception related information
*
*/
public class ExtensionException extends Exception{
private int code;
/***
*This method is the parametrized constructor with message parameter instance
* @param message parameter to show messages
*/
public ExtensionException(final String message){
super(message);
}
/**
* This method is the default constructor instance
*/
public ExtensionException() {}
/**
* This method is parameterized constructor with code and message as parameters
* @param code code used to show the exception
* @param message to show messages
*/
public ExtensionException(int code, String message) {
super(message);
this.code = code;
}
/**
* This method returns code as the output
* @return code for which the exception needs to be raised
*/
public int getCode() {
return code;
}
}