The BitPay client library errors are emitted as events back to the
caller. If the caller does not receives and acts on them, the outcome
is a very uninformative message like this:
TypeError: Uncaught, unspecified "error" event
To prevent this, show the error message to the caller, and hopefully
encourage better practice, this patch adds a very simple error handling
code to the examples where it would matter.
The BitPay client library errors are emitted as events back to the caller. If the caller does not receives and acts on them, the outcome is a very uninformative message like this:
To prevent this, show the error message to the caller, and hopefully encourage better practice, this patch adds a very simple error handling code to the examples where it would matter.
Signed-off-by: Gergely Imreh imrehg@gmail.com