Relative Content

Tag Archive for exception-handling

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

This question already has answers here: Is it good practice to catch a checked exception and throw a RuntimeException? (13 answers) Closed 11 years ago. 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 logic […]

Am I handling my exceptions in a sensible manner?

I’m still restructuring the code I have been given to update on my current work project, and I’ve come to the point where I’m looking at how the code handles an ‘exceptional’ input, that doesn’t conform to the business logic.

Can AspectJ or AOP in general be used to test exception handling?

I’m reading a book’s chapter (“Controlled Exception Test” in “Testing Object-Oriented Testing”) about testing exception handling in a running system (not at unit level). The conclusion is that it is hard to automatically trigger an exception at a given layer in the system other then simulate a cause for an exception.