However, an override may omit any of the base's exception types, or move down an exception's hierarchy. Hence, by default, methods promise not to abnormally interrupt callers. This encourages developers to consider exception handling when they design their interfaces. Correctness vs. convenience Java's strict exception-specification rules cause the occasional bout of programmer frustration. All too often, after careful planning and development of exception-safe code, a programmer discovers that he or she must call a method that throws an unforeseen exception.
Some programmers advocate wrapping exceptions within one another.
One exception-wrapping method allows exceptions of a specified class that includes a member of type Exception . If another type of exception occurs within the method, it is caught and stored in the Exception -typed member. The outer exception is then thrown. The problem with exception wrapping is that, while it adheres to the letter of Java's law, it violates the spirit. There is no guarantee that the inner exception will ever actually be handled.