Home / Function/ invokeWithErrorHandling() — vue Function Reference

invokeWithErrorHandling() — vue Function Reference

Architecture documentation for the invokeWithErrorHandling() function in error.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  6eecb592_f725_6228_0c5d_72897e6929aa["invokeWithErrorHandling()"]
  88dc54e4_4a50_ce50_5fb5_52118613323e["error.ts"]
  6eecb592_f725_6228_0c5d_72897e6929aa -->|defined in| 88dc54e4_4a50_ce50_5fb5_52118613323e
  09b66670_60c6_d4f1_48f9_8f5538b7633e["handleError()"]
  6eecb592_f725_6228_0c5d_72897e6929aa -->|calls| 09b66670_60c6_d4f1_48f9_8f5538b7633e
  style 6eecb592_f725_6228_0c5d_72897e6929aa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/util/error.ts lines 34–54

export function invokeWithErrorHandling(
  handler: Function,
  context: any,
  args: null | any[],
  vm: any,
  info: string
) {
  let res
  try {
    res = args ? handler.apply(context, args) : handler.call(context)
    if (res && !res._isVue && isPromise(res) && !(res as any)._handled) {
      res.catch(e => handleError(e, vm, info + ` (Promise/async)`))
      // issue #9511
      // avoid catch triggering multiple times when nested calls
      ;(res as any)._handled = true
    }
  } catch (e: any) {
    handleError(e, vm, info)
  }
  return res
}

Domain

Subdomains

Frequently Asked Questions

What does invokeWithErrorHandling() do?
invokeWithErrorHandling() is a function in the vue codebase, defined in src/core/util/error.ts.
Where is invokeWithErrorHandling() defined?
invokeWithErrorHandling() is defined in src/core/util/error.ts at line 34.
What does invokeWithErrorHandling() call?
invokeWithErrorHandling() calls 1 function(s): handleError.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free