Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java exception override message

// Most exception classes provide a constructor requesting a String.
// Check the API of your superclass.

public class PersonalException extends RuntimeException{
  
	public PersonalException() {
		super("This is a message for you! Something went wrong...");
	}
}
 
PREVIOUS NEXT
Tagged: #java #exception #override #message
ADD COMMENT
Topic
Name
8+5 =