Exception Object Error Handling in Array-Based Languages

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current error handling techniques in programming languages are inefficient in identifying and managing errors in code, particularly in multi-threaded environments, as they often discard or combine error information, making it difficult to access and debug multiple errors occurring across different threads.

Innovation Solution

The proposed solution involves creating and managing exception objects that include detailed information about errors, allowing for efficient error handling and storage across multiple code blocks and threads, with mechanisms to associate identifiers with these objects and store them in memory for later examination and manipulation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of information

If exception objects are created for every error in multi-threaded code, then error information is preserved and accessible, but memory consumption and system complexity increase

Engineering Contradiction:
Improveerror informationVSAvoidsystem complexity
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The patent introduces an exception object as an intermediary carrier that stores error information, thread context, and stack trace data. This mediator allows error information to be preserved and transferred between threads without directly complicating the core error handling mechanism, resolving the contradiction by providing a structured container that manages complexity while preserving information.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The exception object structure is designed with configurable parameters including thread ID, error message, stack trace depth, and additional context fields. By allowing selective inclusion of these parameters based on debugging needs, the system can adjust the level of detail stored, thereby managing memory consumption and complexity while preserving essential error information.

Inventive Principle:
Principle #35Parameter changes

2Ease of operation

If detailed error information is stored for multiple threads, then debugging capability is improved, but memory usage increases

Engineering Contradiction:
Improvedebugging capabilityVSAvoidmemory usage
Core Design Contradiction:
Ease of operationVSQuantity of substance

Solution Approach 1:

The exception object is segmented into distinct components: basic error information (error message, error type), contextual information (thread ID, location), and detailed diagnostic information (stack trace, variable states). This segmentation allows the system to store only essential information in all cases while optional detailed information can be added when debugging is needed, reducing routine memory usage while maintaining debugging capability when required.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system implements partial action by storing only the most critical error information in production environments, while allowing full detailed information to be stored when debugging mode is activated. This approach provides adequate debugging capability when needed while minimizing memory consumption during normal operation.

Inventive Principle:
Principle #16Partial or excessive action

3Reliability

If exception handling is implemented in array-based languages, then error management is improved, but language complexity and learning curve increase

Engineering Contradiction:
Improveerror managementVSAvoidlanguage complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The exception handling mechanism is designed to be universal across different array-based programming contexts. The same exception object structure and handling syntax work whether errors occur in basic array operations, complex matrix computations, or multi-threaded parallel processing. This universality improves error management reliability while avoiding the need for separate error handling mechanisms for different language features.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The exception object automatically captures and stores relevant error information including thread context, array state, and operation details without requiring manual intervention. The system self-services by populating the exception object with diagnostic information, reducing the complexity burden on language learners while maintaining comprehensive error management capabilities.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS8762953B2Exception-based error handling in an array-based language
Publication Date: 2014.06.24 MATHWORKS INC
  • US8762953B2 patent drawing
  • US8762953B2 patent drawing
  • US8762953B2 patent drawing

AI summary

A computer-readable medium stores computer-executable instructions. The medium may hold: one or more instructions for executing a first code block; one or more instructions for generating an exception object based on the executing of the first code block; one or more instructions for receiving the exception object at a second code block; and one or more instructions for storing the exception object in a memory.