Local buffers for event handlers
First Claim
Patent Images
1. A computer-implemented method, comprising:
- determining, by a processor, that an event has been triggered during execution of a program, wherein the program includes;
an error context generating an error message in a formatting when a first error is detected during execution of the program andan error buffer storing the generated error message;
executing, by the processor, a first registered event handler associated with the event in response to the determination, wherein the first registered event handler includes;
a first local error context generating a first local error message when a second error is detected during execution of the first registered event handler anda first local error buffer storing the first local error message,and wherein the first registered event handler copies the error context to the first local error context during initialization of the first registered event handler so that the formatting is applied to error messages generated during execution of the first registered event handler and error messages generated during execution of the program; and
merging, by the processor, the first local error buffer into the error buffer.
2 Assignments
0 Petitions
Accused Products
Abstract
A technique is described for generating error buffer that includes errors from both a program and event handlers called by the program. A program in an event-driven environment triggers an event. In response to the triggered event, the program calls event handlers related to the event. The event handlers are executed and error messages generated during the execution are stored in a local error buffer. Upon completion of the event handlers, the local error buffers are returned to the program and the program merges the local error buffers with an error buffer associated with the program.
135 Citations
20 Claims
-
1. A computer-implemented method, comprising:
-
determining, by a processor, that an event has been triggered during execution of a program, wherein the program includes; an error context generating an error message in a formatting when a first error is detected during execution of the program and an error buffer storing the generated error message; executing, by the processor, a first registered event handler associated with the event in response to the determination, wherein the first registered event handler includes; a first local error context generating a first local error message when a second error is detected during execution of the first registered event handler and a first local error buffer storing the first local error message, and wherein the first registered event handler copies the error context to the first local error context during initialization of the first registered event handler so that the formatting is applied to error messages generated during execution of the first registered event handler and error messages generated during execution of the program; and merging, by the processor, the first local error buffer into the error buffer. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A non-transitory computer readable storage medium storing one or more programs, the one or more programs comprising instructions for:
-
determining that an event has been triggered during execution of a program, wherein the program includes;
an error context generating an error message in a formatting when a first error is detected during execution of the program and an error buffer storing output generated during execution of the program, the error buffer containing a first error message generated during execution of the program;executing a first registered event handler associated with the event in response to the determination, wherein the first registered event handler includes; a first local error context generating a first local error message when a second error is detected during execution of the first registered event handler and a first local error buffer storing the first local error message, and wherein the first registered event handler copies the error context to the first local error context during initialization of the first registered event handler so that the formatting is applied to error messages generated during execution of the first registered event handler and error messages generated during execution of the program; and merging the first local error buffer into the error buffer. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer implemented system, comprising:
-
a processor; and a non-transitory computer readable medium having stored thereon one or more programs, which when executed by the processor, causes the processor to; determine that an event has been triggered during execution of a program, wherein the program includes;
an error context generating an error message in a formatting when a first error is detected during execution of the program and an error buffer storing output generated during execution of the program, the error buffer containing a first error message generated during execution of the program;execute a first registered event handler associated with the event in response to the determination, wherein the first registered event handler includes; a first local error context generating a first local error message when a second error is detected during execution of the first registered event handler and a first local error buffer storing the first local error message, and wherein the first registered event handler copies the error context to the first local error context during initialization of the first registered event handler so that the formatting is applied to error messages generated during execution of the first registered event handler and error messages generated during execution of the program; and merge the first local error buffer into the error buffer. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification