(
handler,
context,
args,
vm,
info
)
| 1851 | } |
| 1852 | |
| 1853 | function invokeWithErrorHandling ( |
| 1854 | handler, |
| 1855 | context, |
| 1856 | args, |
| 1857 | vm, |
| 1858 | info |
| 1859 | ) { |
| 1860 | var res; |
| 1861 | try { |
| 1862 | res = args ? handler.apply(context, args) : handler.call(context); |
| 1863 | if (res && !res._isVue && isPromise(res) && !res._handled) { |
| 1864 | res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); }); |
| 1865 | // issue #9511 |
| 1866 | // avoid catch triggering multiple times when nested calls |
| 1867 | res._handled = true; |
| 1868 | } |
| 1869 | } catch (e) { |
| 1870 | handleError(e, vm, info); |
| 1871 | } |
| 1872 | return res |
| 1873 | } |
| 1874 | |
| 1875 | function globalHandleError (err, vm, info) { |
| 1876 | if (config.errorHandler) { |
no test coverage detected