Robert

73%
Flag icon
An empty catch block defeats the purpose of exceptions, which is to force you to handle exceptional conditions. Ignoring an exception is analogous to ignoring a fire alarm—and turning it off so no one else gets a chance to see if there’s a real fire. You may get away with it, or the results may be disastrous. Whenever you see an empty catch block, alarm bells should go off in your head.
Robert
Lint checks should disallow this, at least (with option to override on a per-case basis).
Effective Java
Rate this book
Clear rating
Open Preview