Skip to content

Commit

Permalink
fix(runtime-core): Using handleError instead, not throwing error
Browse files Browse the repository at this point in the history
  • Loading branch information
smallnine9 committed Jan 2, 2023
1 parent 7425116 commit aad8bcb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/runtime-core/src/scheduler.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ErrorCodes, callWithErrorHandling } from './errorHandling'
import { ErrorCodes, callWithErrorHandling, handleError } from './errorHandling'
import { isArray, NOOP } from '@vue/shared'
import { ComponentInternalInstance, getComponentName } from './component'

Expand Down Expand Up @@ -261,14 +261,16 @@ function checkRecursiveUpdates(seen: CountMap, fn: SchedulerJob) {
if (count > RECURSION_LIMIT) {
const instance = fn.ownerInstance
const componentName = instance && getComponentName(instance.type)
throw new Error(
handleError(
`Maximum recursive updates exceeded${
componentName ? ` in component <${componentName}>` : ``
}. ` +
`This means you have a reactive effect that is mutating its own ` +
`dependencies and thus recursively triggering itself. Possible sources ` +
`include component template, render function, updated hook or ` +
`watcher source function.`
`watcher source function.`,
null,
ErrorCodes.APP_ERROR_HANDLER
)
return true
} else {
Expand Down

0 comments on commit aad8bcb

Please sign in to comment.