dcsimg
LinkedIn
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java
Expertise: Intermediate
Sep 23, 2019

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
 
Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date