Script Error Handling via Intermediary Runtime Environment
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing error-handling mechanisms in script-based applications for wireless devices are inefficient, as they do not support customizable error handling, particularly due to limitations in ECMAScript, where user-defined error objects cannot be inherited, leading to tedious workarounds and inadequate error management across various components in complex applications.
Innovation Solution
A method and apparatus for handling errors in script-based applications by provisioning a runtime environment that accepts user-defined error components and invokes script functions for customized error handling, using an error collection and handler invoker unit to manage and process errors efficiently, including user-defined, pre-defined, and external errors through a reusable error object and error-handling script function.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If traditional error-handling mechanisms are used in script-based applications, then the application can run on standard script engines, but customizable error handling is not supported and user-defined error objects cannot be inherited
Solution Approach 1:
The patent introduces an intermediary error handling mechanism that sits between the script engine and the application logic. This intermediary layer provides customizable error handling capabilities by intercepting errors, allowing user-defined error objects to be inherited and processed according to custom error-handling strategies, without requiring changes to the underlying script engine.
Solution Approach 2:
The error handling system is segmented into distinct components: error detection, error classification, error-handling strategy selection, and error processing. This segmentation allows each component to be independently configured and customized, enabling flexible error handling while maintaining system modularity and reducing overall complexity.
2Reliability
If script-based applications use standard error handling, then implementation is simple, but error management across various components becomes tedious and inadequate
Solution Approach 1:
The patent implements a universal error-handling mechanism that can handle multiple types of errors across different components through a single unified framework. The system provides multi-functionality by supporting various error-handling strategies (logging, retry, fallback, custom processing) within the same mechanism, improving reliability without requiring separate error handling code for each component.
Solution Approach 2:
The system performs preliminary actions by pre-configuring error-handling strategies and user-defined error objects before runtime errors occur. This allows the application to establish custom error processing logic in advance, making error management more effective and reliable while reducing the operational complexity during actual error handling.
3Reliability
If customizable error handling is implemented, then robust error management is achieved, but the runtime environment requires additional processing capabilities
Solution Approach 1:
The patent implements partial customization by allowing selective application of custom error-handling strategies only where needed in the application. Not all errors require the full customizable error handling mechanism - the system can apply simplified handling for common errors and reserved error handling for less critical cases, reducing runtime processing overhead while maintaining robustness for important errors.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
A method is disclosed for handling an error in a script-based application, the method comprising detecting an error in the script-based application, the detecting comprising identifying the error and handing the detected error in accordance with a predetermined error handling procedure suitable for the identified error.