Possible Duplicate:
Unchecked exceptions in Java: Inherit from Error or RuntimeException?
Looking at how our applications do error handling, we have been steadily moving from a checked ExceptionHierarchy (e.g. Exception -> ApplicationException -> SomethingSpecificBadHappenedException) since in many cases we have many long call chains that just pass up ApplicationException, and it adds little value but cluttering our API (we increasingly agree with the opinions expressed in: Effective Exceptions.
In redesigning our error handling around unchecked exceptions, aligned with a "fault barrier" approach, we initially have started working with a RuntimeException based hierarchy, similar to the example in the Spring Data Access layer
We've been starting to wonder if it would be more clear to have them descend from Error, especially around the fact that it would let us do something like a:
} catch (Exception e) {
within our application in a number of spots, but then differentiate with:
} catch (Throwable t) {
or } catch (Error err) {
which feels cleaner, though I can't think of major examples of APIs following this. Am looking for examples from preferably common APIs of where to root our exception/error hierarchy, or comments on style or functional differences that should dictate one root in preference to the other.