Font Size: a A A

The case for exception handling

Posted on:2005-12-16Degree:Ph.DType:Thesis
University:University of Victoria (Canada)Candidate:Zastre, Michael M. JFull Text:PDF
GTID:2458390008984560Subject:Computer Science
Abstract/Summary:
Mechanisms for handling exceptions within programming languages are now nearly forty years old, and attitudes towards exception handling betray the original association of "exception" with "error". There have been several attempts to justify the use of exception handling as a general programming tool for expressing control flow, but the current consensus is that "exceptions should be rare, therefore their implementation need not be efficient". This thesis argues the opposite view by making several contributions, roughly categorized as: (a) examination of the use of exceptions in the Java programming language, and in turn using these results to identify opportunities for improving performance in a Java Virtual Machine (JVM); (b) identifying and discussing several programming idioms which lend themselves to an exception-handling style; and (c) introducing a program transformation to improve performance of regular code by using exceptions to eliminate redundant run-time tests. A research VM has been modified to explore the effectiveness of these ideas, and experimental results are presented. The overall aim of this thesis, however, is to present the viewpoint that exceptions should and can be used more often, and that significant opportunities for improving exception-handling performance do exist within purely-interpreted (i.e., non-JIT) VM implementations.
Keywords/Search Tags:Exception, Handling, Programming
Related items