Bagikan melalui


Using the IgnoreException Fix

Applies To: Windows 7, Windows Vista

This section includes information about using the IgnoreException compatibility fix, including the associated issues, the available command-line options and usage, and the recommended fix for a permanent solution.

Important

Be advised that you should only use this compatibility fix if you are absolutely certain that it is acceptable to ignore the exception. You might experience additional compatibility issues if you choose to incorrectly ignore an exception.

IgnoreException

IgnoreException enables an application to ignore Structure Exception Handling exceptions and to function properly. The IgnoreException fix calls to an internal API which is equivalent to the AddVectoredExceptionHandler public API. The fix then passes a pointer to the exception handler, which handles the exception as defined by the command-line options configured by the end user.

Investigating the Issue

Application-related issues that can be resolved by applying the IgnoreException fix are typically detected by using a debugger tool, which will enable you to extract detailed information about the specific exception. You must understand the code and the behavior of the exception. in order to correctly predict the results of ignoring the exception. You must also follow up with extensive testing to ensure that you are not proceeding with the system in an undefined state after the exception occurs.

Command-Line Options

The IgnoreException compatibility fix uses the following syntax to specify exceptions.

EXCEPTION_NAME:EXCEPTION_LEVEL;EXCEPTION1_NAME:EXCEPTION1_LEVEL;...

Where the EXCEPTION_NAME can be one of the following values:

  • ACCESS_VIOLATION_READ

  • ACCESS_VIOLATION_WRITE

  • ARRAY_BOUNDS_EXCEEDED

  • BREAKPOINT

  • DATATYPE_MISALIGNMENT

  • FLT_DENORMAL_OPERAND

  • FLT_DIVIDE_BY_ZERO

  • FLT_INEXACT_RESULT

  • FLT_INVALID_OPERATION

  • FLT_OVERFLOW

  • FLT_STACK_CHECK

  • FLT_UNDERFLOW

  • ILLEGAL_INSTRUCTION

  • IN_PAGE_ERROR

  • INT_DIVIDE_BY_ZERO

  • INT_OVERFLOW

  • INVALID_DISPOSITION

  • NONCONTINUABLE_EXCEPTION

  • PRIV_INSTRUCTION

  • SINGLE_STEP

  • STACK_OVERFLOW

  • INVALID_HANDLE

And where the EXCEPTION_LEVEL can be one of the following values, as listed in the following table:

Accepted EXCEPTION_LEVEL Description

0

Does not ignore the first exception.

1

Ignores the first chance exception.

2

Ignores the second chance exception

3

Exits the process on the second chance exception.

Example

ACCESS_VIOLATION_READ:2; ACCESS_VIOLATION_WRITE:2; FLT_OVERFLOW:0

Fixing Your Code

The application should be modified to resolve the issue that is causing the exception to occur. If that is not possible, you must include error handling that can address the expected exception.

See Also

Concepts

Windows Vista and Windows 7 Operating Systems