forked from apache/cordova-common
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(CordovaError): support for error cause & more
This commit bases CordovaError on the popular [joyent/node-verror]. We actually use @netflix/nerror, a VError fork, for now. That's because we do not want printf style error formatting support and that fork allows to disable it. There's [ongoing work][1] to integrate that change into the original VError. So basically CordovaError behaves like PError but with all the static methods from VError and different parameter ordering for its constructor. One change that could break some existing tests in repositories that use cordova-common is that `toString` (for errors without a cause argument) now behaves like the Error default again: new CordovaError('foo').toString(); // old result: 'foo' // new result: 'CordovaError: foo' [joyent/node-verror]: https://github.com/joyent/node-verror [1]: TritonDataCenter/node-verror#63 (comment)
- Loading branch information
1 parent
6f922c0
commit 3f8c8ee
Showing
4 changed files
with
117 additions
and
28 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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