EN
本內容沒有您的語言版本,但有英文版本。

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. For more info, see How to review your app's quality.

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
How to review your app's quality

 

 

Build date: 12/16/2013

顯示:
© 2014 Microsoft