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 within a given scope, the debugger can then choose whether to take some specified action on exceptions thrown inside that scope: for instance, if the developer wishes to break on user-unhandled exceptions. Setting this property to false is the same as never having set the property.

For more information on debugging, see the 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: ExE-Boss, brdjns, khorne3, erikadoyle
Last updated by: ExE-Boss,