Early Exception Notification System for Diagnostic Logging

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing systems face challenges in detecting and logging software exceptions, especially in complex applications with third-party components, as they often occur outside the developer's code and are difficult to handle without impacting program state or requiring debugger overhead.

Innovation Solution

An exception notification system that provides early notifications to registered handlers before traditional exception handling, allowing developers to inspect and log exceptions programmatically across all threads, without altering existing exception-handling behavior.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of information

If traditional exception handling is used, then exceptions are processed by the runtime system, but detailed information about the exception cause is lost before runtime processing occurs

Engineering Contradiction:
Improveexception cause informationVSAvoidexception handling system
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The patent applies preliminary action by capturing exception information at the moment the exception is raised, before the runtime system processes it. The notification handler registered with the runtime system intercepts the exception immediately when it occurs, allowing the application to log detailed information about the exception cause before any runtime processing modifies or loses that information.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If debugger overhead is used to detect exceptions, then detailed exception information can be captured, but the solution is not practical for regular consumer scenarios

Engineering Contradiction:
Improveexception detection capabilityVSAvoidpractical usability
Core Design Contradiction:
Measurement precisionVSEase of operation

Solution Approach 1:

The patent extracts the exception detection and logging functionality from the debugger environment and implements it directly within the application through a notification handler. This separates the diagnostic capability from the debugging tool, allowing the application to autonomously capture and log exception information in production environments without requiring debugger attachment or overhead.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces a notification handler as an intermediary between the runtime system's exception processing and the application's logging mechanism. This handler receives notifications from the runtime system about raised exceptions and forwards them to logging infrastructure, serving as a mediator that enables detailed exception capture without requiring debugger involvement.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Loss of information

If exception handlers are added to intercept exceptions, then exception information can be logged, but the program state may be corrupted or existing exception handling behavior altered

Engineering Contradiction:
Improveexception logging capabilityVSAvoidprogram state integrity
Core Design Contradiction:
Loss of informationVSReliability

Solution Approach 1:

The patent uses copying by creating a notification handler that receives copies of exception information from the runtime system rather than directly intercepting and modifying the exception processing flow. The handler logs a copy of the exception data without altering the original exception handling behavior or program state, ensuring reliability while maintaining logging capability.

Inventive Principle:
Principle #26Copying

Data Source

PatentEP2427822B1Exception raised notification
Publication Date: 2019.03.13 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP2427822B1 patent drawingFigure 1
  • EP2427822B1 patent drawingFigure 2
  • EP2427822B1 patent drawingFigure 3

AI summary

An exception notification system is described herein that provides an early notification that a software exception has occurred before exception handling code has run. The exception notification system receives a registration request from program code to register a handler to receive an early notification when an exception occurs. When an exception occurs, the system raises an event that calls each registered handler. After the handler returns, the system performs normal exception handling, so that the early notification does not change existing exception-handling behavior. The exception notification system allows a program to inspect and log an exception before the program state has been modified by exception handling. The program code can capture detailed information about the cause of the exception to enable further offline analysis. Thus, the exception notification system allows developers to improve their programs by receiving more information about unexpected conditions in the program code.