Debug.setNonUserCodeExceptions

The debug.setNonUserCodeExceptions property determines whether any try-catch blocks in this scope are to be treated by the debugger as user-unhandled. Exceptions can be classified as thrown, user-unhandled or unhandled.

Syntax

Debug.setNonUserCodeExceptions [= bool];

Remarks

If this property is set to true in a given scope, the debugger can then determine to take some action (for example, break) on exceptions thrown inside that scope if the developer wishes to break on user-unhandled exceptions. If this property is set to false is the same as if the property was never set.

For more information on debugging, see Active Script Debugging Overview.

Example

The following code shows how to set this property.

(function () {  
    Debug.setNonUserCodeExceptions = true;  
    try{  
        var x = null;  
        x.y();  
    } catch (e) {  
    // Catch the exception.  
    }  
})();

Requirements

Supported in the following document modes: Internet Explorer 10 standards and Internet Explorer 11 standards. Also supported in Store apps (Windows 8 and Windows Phone 8.1).
Not supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards.

See also

Document Tags and Contributors

Contributors to this page: brdjns, khorne3, erikadoyle
Last updated by: brdjns,