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