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 |
|
See also
Build date: 12/5/2012