Condividi tramite


terminateApp method

Terminates the current application and generates a failure report.

Syntax

MSApp.terminateApp(error);

Parameters

  • error [in]
    Type: Error

    An Error object that you can use to describe the error that triggered the termination. The Error object must contain the number, description, and stack properties; a failure report won't be generated if the object doesn't contain these properties.

Return value

This method does not return a value.

Remarks

If the issue reported by terminateApp becomes one of your app's top 5 issues, it will show up on the app's Quality page.

Examples

This example calls terminateApp when an exception is encountered. It uses the Error object provided when you catch an exception.

try {  
        var obj2 = null;  
        obj2.val = 5;  
    }  
    catch(e) {  
        window.MSApp.terminateApp(e);  
    }  
 

See also

MSApp