Saturday, July 29, 2017

How to define custom exceptions in java

public class custException extends RuntimeException {
    public String errorKey;

    public custException() {
 super();
    }

    public custException(String msg) {
 super(msg);
    }

    public custException(Throwable e) {
 super(e);
    }

    public custException(String msg, Throwable e) {
 super(msg, e);
    }
}