Error Reporting Structure with Macro Population

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current error reporting in software applications is inadequate as simple error codes fail to provide sufficient information about the exact location of errors, making debugging inefficient and time-consuming, especially in scenarios like time-outs where errors can occur at various points in the software.

Innovation Solution

A novel error reporting mechanism that includes error reporting structures to store pertinent information such as file name, function name, and line number, with the use of macros to populate these structures, allowing for comprehensive error reporting by passing a pointer to the error reporting structure as a parameter to functions and defining the structure's size and content based on compiler flags.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If simple error codes are used for error reporting, then the error reporting system is simple and easy to implement, but the error location information is insufficient making debugging inefficient

Engineering Contradiction:
Improveerror reporting system complexityVSAvoiderror location information
Core Design Contradiction:
Device complexityVSLoss of information

Solution Approach 1:

The error reporting system is segmented into multiple fields within an error reporting structure, including error code, file name, function name, and line number. Each field captures a specific aspect of error information, allowing comprehensive error tracking while maintaining organized and manageable code structure.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The error reporting system transitions from one-dimensional error codes to multi-dimensional error information by incorporating file name, function name, and line number dimensions. This dimensional expansion provides comprehensive error location context without significantly increasing system complexity.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Measurement precision

If detailed error information is collected including file name, function name, and line number, then error location precision is improved, but the complexity of the error reporting system increases

Engineering Contradiction:
Improveerror location precisionVSAvoiderror reporting system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The error reporting structure is pre-defined with all necessary fields (error code, file_name, function_name, line_number) before error occurrence. This preliminary setup eliminates the need for complex real-time information gathering and processing during error handling, reducing system complexity while maintaining high precision.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The error reporting mechanism automatically captures detailed location information (file name, function name, line number) without requiring manual intervention or complex processing. The system serves itself by autonomously populating the error reporting structure with precise error context.

Inventive Principle:
Principle #25Self-service

3Loss of information

If error reporting structures are passed as parameters to functions, then error information completeness is improved, but the function parameter complexity increases

Engineering Contradiction:
Improveerror information completenessVSAvoidfunction parameter complexity
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The error reporting structure serves multiple functions: it stores error codes, file names, function names, and line numbers in a single unified parameter. This multi-functionality allows comprehensive error information transmission without requiring multiple separate parameters, reducing overall parameter complexity.

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

4Productivity

If comprehensive error information is stored in error reporting structures, then debugging efficiency is improved, but memory usage increases

Engineering Contradiction:
Improvedebugging efficiencyVSAvoidmemory usage
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The error reporting structure is designed as a lightweight, temporary data structure used only during error reporting. It stores essential error location information in compact fields (file_name, function_name, line_number) without excessive overhead, providing high debugging efficiency while consuming minimal memory resources.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

Data Source

PatentUS10437659B2Built-in context error variables
Publication Date: 2019.10.08 SILICON LABORATORIES INC
  • US10437659B2 patent drawing
  • US10437659B2 patent drawing
  • US10437659B2 patent drawing

AI summary

A novel method of reporting pertinent information in the event of an error during the execution of a software application is disclosed. The software application includes one or more error reporting structures, which are used to store the pertinent information for each error that is encountered. The pertinent information may include, for example, the file name, the function name, the line number within the function, and others. In some embodiments, a macro is used to populate one or more fields of the error reporting structure. Various methods of identifying the location of the error reporting structure are also disclosed.