public class MyExceptionName extends Exception { public MyExceptionName() { super("Some string explaining the exception"); } }