# wx.onUnhandledRejection(function callback)
Start from base library version 2.10.0. Please remaining backward compatible.
with Promise style call: Not supported
Mini Program plugin: Not supported
Listening for unhandled Promise Reject event. This event is related to App.onUnhandledRejection
The callback timing of the.
# parameter
# function callback
Untreated Promise A callback function that rejects events
# parameter
# Object res
attribute | type | Introductions |
---|---|---|
reason | string | The reason for rejection is usually one Error object |
promise | Promise.<any> | Rejected Promise object |
# Be careful
- All of it. unhandledRejection Can be captured by this wiretap, but only Error Type will trigger an alarm in the background of the Mini Program.