對軟體開發而言,例外處理設計與實作是一個重要但卻困難的議題。在Java語言中由於區分了checked與unchecked例外而使得例外處理更加的困難。本論文提出一個包含三種例外處理能力的例外處理架構,從例外可恢復性的角度來指導在Java語言中例外處理的方式。透過應用實例,我們展示出該架構可作為引導開發人員分析與決定例外處理策略的一種概念模型。此外,我們更進一步釐清例外處理的責任並且基於此責任提出數個例外處理策略。為了讓開發人員可以方便地利用我們所提出的例外處理策略,本論文以Eclipse plug-in的形式設計與實作一個支援例外處理的工具,並說明其設計架構與應用實例。 藉由本論文所提出的方法,我們分別由系統架構面與實務面的角度來協助開發人員進行例外處理的分析、設計與實作,以期有效地增進軟體系統的強健度。
Exception handling is an important but difficult issue in software development. In Java, the separation of checked and unchecked exceptions aggravates the difficulty. From the recoverability perspective of exceptions, this thesis proposes an exception architectural model, which contains three levels of exception handling abilities, as a means to guide exception handling. We show that the architectural model acts as a conceptual model for evaluating and determining suitable exception handling policies. The thesis further clarifies the responsibility of exception handlers and provides several exception handling policies to aid developers in writing exception handling code. We develop an Eclipse plug-in embodying the policies to streamline its application. Its design and usage are presented as well. By covering both the architecture and the implementation perspectives, the research can assist developers in consistently analyzing, designing, and implementing exception handling programs and to effectively achieve software robustness.