System and method for exception handling in dynamically linked programs
AssigneeSun Microsystems, Inc.
InventorsFrank Yellin, William N. Joy, Arthur A. Van Hoff
Life of this patent
Estimating the term…
Loading patent…
AssigneeSun Microsystems, Inc.
InventorsFrank Yellin, William N. Joy, Arthur A. Van Hoff
Estimating the term…
A compiler requires normal exceptions that are throwable by a method to be either explicitly declared or else "caught" by appropriate exception handlers in the method to be compiled. This ensures that all normal exceptions thrown will be handled by a programmer specified exception handler. The compiler inspects all instructions in a specified method that throw exceptions and all instructions that invoke other methods, and determines whether each type of exception throwable by those instructions and invocable methods is (A) a serious exception (i.e., not a normal exception), (B) is caught by an enclosing exception handler, or (C) is explicitly declared in the method header of the specified method. If any throwable exception cannot be so categorized, that means the throwable exception is a normal exception that is not caught by an enclosing exception and is not explicitly declared in the method header, which means that the method to be compiled is not well formed. As a result, the compiler rejects the specified method, aborting compilation and generating an appropriate error message. The compiler determines the set of throwable exceptions in part by inspecting the methods that are invocable by the specified method for declarations of throwable exceptions. When initiating execution of the specified method, the program execution system inspects the method's declaration of throwable exceptions and blocks execution of the specified method unless exception handlers have been established for handling all the exceptions, if any, included in the declaration.
A computer implemented method of managing exceptions throwable by a specified method, said specified method including a declaration of throwable exceptions, said throwable exceptions in said declaration including exceptions throwable during execution of said specified method that may not be handled by enclosing exception handlers, comprising the steps of:
A computer program product for use in conjunction with a computer system, the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, the computer program mechanism configured to direct the operation of the computer system to manage exceptions throwable by a specified method, said specified method including a declaration of throwable exceptions, said throwable exceptions in said declaration including exceptions throwable during execution of said specified method that may not be handled by enclosing exception handlers, comprising:
In a distributed computer system, a set of computer-readable modules suitable for transmission over communications links to data processing systems, said set of modules comprising:
Dependencies are inferred from the claim text.