you can create an customized exception by extending the Exception class

sample code for you:

public class MyException extends Exception {

public MyException(String message)
{...