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
  ceab10d8_e3b3_eb2d_840f_d5b199af5a26["invokeWithErrorHandling()"]
  34ce4c45_a0c3_08f3_7cbe_679778705432["error.ts"]
  ceab10d8_e3b3_eb2d_840f_d5b199af5a26 -->|defined in| 34ce4c45_a0c3_08f3_7cbe_679778705432
  4935dbd4_998d_c5cd_41c0_2e16500a201c["handleError()"]
  ceab10d8_e3b3_eb2d_840f_d5b199af5a26 -->|calls| 4935dbd4_998d_c5cd_41c0_2e16500a201c
  style ceab10d8_e3b3_eb2d_840f_d5b199af5a26 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