Promise.wrapError method

4 out of 5 rated this helpful - Rate this topic

Wraps a non-promise error value in a promise. You can use this function if you need to pass an error to a function that requires a promise.

Syntax


promise.wrapError(error).done( /* Your success and error handlers */ );

Parameters

error

Type:

A non-promise error value to be wrapped in a promise.

Return value

Type: Promise

A promise that is in an error state with the specified value.

Remarks


WinJS.Promise.wrapError(error);

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Namespace

WinJS

Library

Base.js

See also

Promise

 

 

Build date: 12/5/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.