MCPcopy Create free account
hub / github.com/dashnowords/imfe / invokeWithErrorHandling

Function invokeWithErrorHandling

chapter17/vue.js:1854–1874  ·  view source on GitHub ↗
(
    handler,
    context,
    args,
    vm,
    info
  )

Source from the content-addressed store, hash-verified

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) {

Callers 3

invokerFunction · 0.85
eventsMixinFunction · 0.85
callHookFunction · 0.85

Calls 2

isPromiseFunction · 0.85
handleErrorFunction · 0.70

Tested by

no test coverage detected