System, method, and article of manufacture for a polymorphic exception handler in environment services patterns
First Claim
Patent Images
1. A method for minimizing the amount of changes that need to be made to exception handling logic when new exceptions are added, comprising the steps of:
- (a) organizing exceptions into hierarchies in a polymorphic exception handler;
(b) catching a root of one of the hierarchies in which an exception occurs;
(c) instructing the exception to rethrow itself;
(d) catching the rethrown exception;
(e) identifying the rethrown exception;
(f) determining a type of the rethrown exception;
(g) outputting a message indicating the type of the rethrown exception; and
(h) creating catch blocks to catch the rethrown exception.
4 Assignments
0 Petitions
Accused Products
Abstract
A system, method and article of manufacture are provided for minimizing the amount of changes that need to be made to exception handling logic when new exceptions are added. Exceptions are organized into hierarchies in a polymorphic exception handler. A root of one of the hierarchies in which an exception occurs is caught. The exception is instructed to rethrow itself. The rethrown exception is caught and identified. A type of the rethrown exception is determined and a message is outputted indicating the type of the rethrown exception.
-
Citations
15 Claims
-
1. A method for minimizing the amount of changes that need to be made to exception handling logic when new exceptions are added, comprising the steps of:
-
(a) organizing exceptions into hierarchies in a polymorphic exception handler;
(b) catching a root of one of the hierarchies in which an exception occurs;
(c) instructing the exception to rethrow itself;
(d) catching the rethrown exception;
(e) identifying the rethrown exception;
(f) determining a type of the rethrown exception;
(g) outputting a message indicating the type of the rethrown exception; and
(h) creating catch blocks to catch the rethrown exception. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A computer program embodied on a computer readable medium for minimizing the amount of changes that need to be made to exception handling logic when new exceptions are added, comprising:
-
(a) a code segment that organizes exceptions into hierarchies in a polymorphic exception handler;
(b) a code segment that catches a root of one of the hierarchies in which an exception occurs;
(c) a code segment that instructs the exception to rethrow itself;
(d) a code segment that catches the rethrown exception;
(e) a code segment that identifies the rethrown exception;
(f) a code segment that determines a type of the rethrown exception;
(g) a code segment that outputs a message indicating the type of the rethrown exception; and
(h) a code segment that creates catch blocks to catch the rethrown exception. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A system for minimizing the amount of changes that need to be made to exception handling logic when new exceptions are added, comprising:
-
(a) logic that organizes exceptions into hierarchies in a polymorphic exception handler;
(b) logic that catches a root of one of the hierarchies in which an exception occurs;
(c) logic that instructs the exception to rethrow itself;
(d) logic that catches the rethrown exception;
(e) logic that identifies the rethrown exception;
(f) logic that determines a type of the rethrown exception;
(g) logic that outputs a message indicating the type of the rethrown exception; and
(h) logic that creates catch blocks to catch the rethrown exception. - View Dependent Claims (12, 13, 14, 15)
-
Specification