Home » Tip Bank » Java
  • Comment on this Article
Language: Java
Expertise: Intermediate
Sep 23, 2019
  • facebook
  • twitter
  • in
  • Email

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Watch

Quick Approach to Creating a Custom RuntimeException

The quickest way to create a custom RuntimeException is as follows (simply extend RuntimeException):

public class IncorrectFileException extends RuntimeException {

    public IncorrectFileException(String errorMessage, Throwable err) {
        super(errorMessage, err);
    }
}
Octavia Anghel
 
Submit a Tip
Browse "Java" Tips
Browse All Tips
eloquentjavascript.net
activatejavascript.org