Robert

71%
Flag icon
If an exception fits your needs, go ahead and use it, but only if the conditions under which you would throw it are consistent with the exception’s documentation: reuse must be based on documented semantics, not just on name.
Robert
And also if there aren't other Exceptions that you want to throw that would make to the same Exception. In which case, you'll likely want to subclass the standard exception.
Effective Java
Rate this book
Clear rating
Open Preview