-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Standardize Error objects for Promises
Summary: public Promises are coming. And as part of it, we are standardizing the error objects that will be returned. This puts the code in place on the Android side to always send the proper error format. It will be an error object like this { code : "E_SOME_ERROR_CODE_DEFINED_BY_MODULE", // Meant to be machine parseable message : "Human readable message", nativeError : {} // Some representation of the underlying error (Exception or NSError) , still figuring out exactly, but hopefully something with stack info } Reviewed By: nicklockwood Differential Revision: D2840128 fb-gh-sync-id: 174d620e2beb53e1fc14161a10fd0479218d98a6
- Loading branch information
Dave Miller
authored and
facebook-github-bot-5
committed
Jan 19, 2016
1 parent
554292d
commit 0c5f279
Showing
5 changed files
with
21 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0c5f279
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised that
RCTPromiseRejectBlock
needs different info and therefore gets a different signature thanRCTResponseErrorBlock
. Either way, https://facebook.github.io/react-native/docs/native-modules-ios.html#promises probably wants to be updated :)0c5f279
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great if you could send a PR @philikon :)