Skip to Main Content
Exception handling is a powerful mechanism that separates the error handling code from normal code. It makes software do its utmost to run on the normal state. However, incorrect usage of exception will bring about more potential faults in the code. Based on the study of exception model of C++, a typical object-oriented language, we present a method of constructing control flows for both explicit exception and implicit exception. Subsequently, provide a model that can improve the robustness of programs via static exception analysis. This paper also discusses methods of dynamic exception structural testing and proposes several testing strategies. Finally, a rough prototype tool for exception analysis and testing has been implemented, and some preliminary experiments have been performed under it. The experiment results show that our methods of static exception inspection and dynamic exception testing are fairly effective to expose the potential exception errors. Furthermore, statistical structural exception testing is also considerably useful to find out some normal faults.
Date of Conference: 16-20 June 2005