diff --git a/packages/runtime-core/src/scheduler.ts b/packages/runtime-core/src/scheduler.ts index 9af84cdb..9a0c4081 100644 --- a/packages/runtime-core/src/scheduler.ts +++ b/packages/runtime-core/src/scheduler.ts @@ -1,4 +1,4 @@ -import { handleError, ErrorCodes } from './errorHandling' +import { ErrorCodes, callWithErrorHandling } from './errorHandling' import { isArray } from '@vue/shared' const queue: Function[] = [] @@ -71,11 +71,7 @@ function flushJobs(seenJobs?: JobCountMap) { } } } - try { - job() - } catch (err) { - handleError(err, null, ErrorCodes.SCHEDULER) - } + callWithErrorHandling(job, null, ErrorCodes.SCHEDULER) } flushPostFlushCbs() isFlushing = false