posted 17 years ago
You can choose.
If your new exception class extends java.lang.Exception, it is a checked exception. In general, your user-defined exceptions should be checked exceptions.
If your new exception class extends java.lang.RuntimeException, it is an unchecked exception. Unchecked exceptions are generally for situations that cannot occur, when the code is working properly - i.e. for indicating bugs.
If your new exception class extends java.lang.Error, it is an Error. Errors are for fatal system problems (e.g. out-of-memory) and are unchecked; there are few valid reasons to define a new Error, but it is legal to do so, if you find a reason.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.