MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / errorHandler

Function errorHandler

bin/codecept.js:38–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36
37const errorHandler =
38 fn =>
39 async (...args) => {
40 try {
41 await fn(...args)
42 } catch (e) {
43 printError(e)
44 process.exitCode = 1
45 }
46 }
47
48const dynamicImport = async modulePath => {
49 const resolvedPath = resolveImportModulePath(modulePath)

Callers 2

commandHandlerFunction · 0.85

Calls 2

printErrorFunction · 0.90
fnFunction · 0.50

Tested by

no test coverage detected