摘要 |
A system is configured to obtain code that includes a set of protected instructions, the set of protected instructions, when executed, performing acts associated with the code; execute a region of the code, the region including a protected instruction, the protected instruction identifying a first condition that, when satisfied by a condition under which a particular error is detected, causes an exception, associated with the particular error, to be raised, the first condition being specified by a programmer associated with the computing device; detect an error within a line of the code associated with the protected instruction; identify a second condition under which the error is detected; determine whether the second condition satisfies the first condition; raise an exception, associated with the error, when the second condition satisfies the first condition; and process the error based on raising the exception associated with the error. |
主权项 |
1. A method, comprising:
obtaining, by a computing device, programming code,
the programming code including a set of protected instructions,
the set of protected instructions, when executed by the computing device, performing acts associated with the programming code; executing, by the computing device, a region of the programming code that includes a protected instruction, of the set of protected instructions,
the protected instruction identifying a first condition that, when satisfied by a condition under which a particular error is detected, causes an exception, associated with the particular error, to be raised,
the first condition being specified by a programmer associated with the computing device; detecting, by the computing device, an error within a line of the programming code associated with the protected instruction; identifying, by the computing device, a second condition under which the error is detected; determining, by the computing device, whether the second condition satisfies the first condition; raising, by the computing device, an exception, associated with the error, when the second condition satisfies the first condition; and processing, by the computing device, the error based on raising the exception associated with the error,
processing the error including at least one of:
remedying the error,ignoring the error,allowing the error to propagate to another region of the programming code, orstoring information, associated with the error, in a memory associated with the computing device. |