CMU-ISRI-05-102 Institute for Software Research International School of Computer Science, Carnegie Mellon University
Statically-Scoped Exceptions: Neel Krishnaswami, Jonathan Aldrich January 2005 This report was originally published on the web in January 2004.
CMU-ISRI-05-102.ps
We propose statically-scoped exceptions as an alternative mechanism for error-handling. In our system, a thrown exception is caught by the nearest lexically-enclosing exception handler, rather than the nearest handler on the call stack. Using static scoping allows us to achieve better modularization, as with AspectJ, and also precudes the problem of exception capture. We provide a static type system that tracks exceptions precisely and ensures that statically-scoped exceptions cannot be misused to cause continuation-like behavior. We hope that our system will serve as a foundation for error handling mechanisms that combine good modularization with strong static reasoning about errors. 10 pages
| |
Return to:
SCS Technical Report Collection This page maintained by reports@cs.cmu.edu |