Skip to main content

All Questions

34votes
8answers
15kviews

Is throwing an exception an anti-pattern here?

I just had a discussion over a design choice after a code review. I wonder what your opinions are. There's this Preferences class, which is a bucket for key-value pairs. Null values are legal (that'...
Konrad Morawski's user avatar
2votes
2answers
1kviews

Wrapping specific checked exception in domain unchecked ones? [duplicate]

Uncle Bob says in Clean Code book that Unchecked Exceptions should be used. Now JDK has some checked exceptions: IOException, IllegalAccessException etc. which cannot be avoided. In my application ...
Random42's user avatar
22votes
6answers
13kviews

Efficient try / catch block usage?

Should catch blocks be used for writing logic i.e. handle flow control etc? Or just for throwing exceptions? Does it effect efficiency or maintainability of code? What are the side effects (if there ...
HashimR's user avatar
21votes
9answers
3kviews

How to teach Exception Handling for New Programmers? [closed]

How do you go about teaching Exception Handling to Programmers. All other things are taught easily - Data Structures, ASP.NET, WinForms, WPF, WCF - you name it, everything can be taught easily. With ...
Kanini's user avatar
  • 2,258

close