vue
Vue 3 Runtime Error Codes
Numeric error codes used internally by the Vue 3 runtime to identify where an unhandled error originated. These codes appear in the second argument passed to app.config.errorHandler and in Vue's console warnings.
15 codes
references github.com/vuejs/core/blob/main/packages/runtime-core/src/errorHandling.tsvuejs.org/api/application
· All codes 15 codes
- 0 Error in setup() An unhandled exception was thrown inside a component's setup() function. Check the error's stack trace for the specific line in your setup logic.
- 1 Error in render function An unhandled exception was thrown while executing a component's render function. This includes errors in template expressions and in the body of a functional component.
- 2 Error in watcher getter An unhandled exception was thrown in the getter function of a watch() or watchEffect() call. The getter is the first argument (the source expression) and runs synchronously to collect dependencies.
- 3 Error in watcher callback An unhandled exception was thrown in the callback of a watch() call. This is the function that runs after the watched source changes.
- 4 Error in watcher cleanup An unhandled exception was thrown in the cleanup function returned by a watchEffect() call. Cleanup functions are invoked before the effect re-runs and when the watcher is stopped.
- 5 Error in native event handler An unhandled exception was thrown in a DOM native event listener attached via v-on (e.g. @click, @input). The handler is the function bound to the element.
- 6 Error in component event handler An unhandled exception was thrown in a component event handler registered via v-on or emit(). These are custom events emitted by child components, not native DOM events.
- 7 Error in vnode hook An unhandled exception was thrown in a vnode lifecycle hook such as onVnodeMounted, onVnodeUpdated, or onVnodeUnmounted attached directly to an element via v-bind.
- 8 Error in directive hook An unhandled exception was thrown in one of a custom directive's lifecycle hooks (created, beforeMount, mounted, beforeUpdate, updated, beforeUnmount, or unmounted).
- 9 Error in transition hook An unhandled exception was thrown in a Transition or TransitionGroup hook such as onBeforeEnter, onEnter, onLeave, or onAfterLeave.
- 10 Error in app.config.errorHandler An unhandled exception was thrown inside the global error handler itself (app.config.errorHandler). Errors in the error handler are logged to the console to avoid silent failure.
- 11 Error in app.config.warnHandler An unhandled exception was thrown inside the global warning handler (app.config.warnHandler). Vue logs the exception directly so that development warnings are still visible.
- 12 Error in ref function An unhandled exception was thrown in a function ref — a ref attribute whose value is a function rather than a plain ref object. Function refs are called with the element or component instance when the node is mounted or unmounted.
- 13 Error in async component loader An unhandled exception was thrown in the loader function of a defineAsyncComponent() call. This typically means the dynamic import failed or the component factory threw before resolving.
- 14 Error in scheduler flush An unhandled exception was thrown while Vue's scheduler was flushing its queue of pending effects and watchers. This is an internal Vue error that usually wraps another root cause thrown during component updates.