发明名称 Contract failure behavior with escalation policy
摘要 An error handling system is described herein that provides a facility for controlling the behavior of software when the software violates a contract condition. The system provides configurable runtime behavior that takes place when a contract fails. The error handling system provides an event that a hosting application or other software code can register to handle and that the system invokes upon detecting a contract failure. The application's response to the event determines how the system handles the failure. If the event is unhandled, the system triggers an escalation policy that allows an administrator or application to specify how the system handles contract failures. Thus, the error handling system provides increased control over the handling of contract failures within software code.
申请公布号 US8782607(B2) 申请公布日期 2014.07.15
申请号 US200912389373 申请日期 2009.02.20
申请人 Microsoft Corporation 发明人 Andersen Melitta L. G.;Barnett Michael;Fahndrich Manuel A.;Grunkemeyer Brian M.;King Katherine E.;Magruder Michael M.;Pardoe Andrew J.;Khanna Kumar Gaurav
分类号 G06F9/44;G06F11/36;G06F11/32 主分类号 G06F9/44
代理机构 代理人 Azure Tony;Sanders Andrew;Minhas Micky
主权项 1. A computer-implemented method for allowing a software application to respond to a failed contract condition specified by an author of the application, the method comprising: determining whether a contract condition failed, wherein the contract condition is included in a stream of instructions that execute along with software code that comprises functional elements of the software application, and wherein in response to encountering a contract condition, the processor executes the condition alongside other software instructions; if the contract condition failed, determining whether an event handling routine is registered for handling the failed contract condition;in response to determining that an event handling routine is registered, invoking the event handling routine, wherein an error handling system provides an event that a hosting application that hosts hosted software code can register to handle and that the system invokes upon detecting a contract failure within the hosted software code in a manner that the hosting application's response to the event determines how the system further handles the failure;receiving a response from the event handling routine that indicates whether the event handling routine handled the failed contract condition and invoking the escalation policy in response to determining that the event handling routine did not handle the failed contract condition; andbased on a returned result from the registered event handling routine, invoking an execution policy that specifies a configured action for handling contract condition failures, wherein the preceding steps are performed by at least one processor.
地址 Redmond WA US