refactor(scheduler): replace try catch with callWithErrorHandling (#264)

This commit is contained in:
Jooger 2019-10-14 12:32:01 +08:00 committed by Evan You
parent 70a142c203
commit 312907c9d8

View File

@ -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