Answers for "how to set message for exception"

0

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...");
	}
}
Posted by: Guest on November-17-2020

Code answers related to "how to set message for exception"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language