Skip to content

Commit 5c27c8a

Browse files
committed
fix missing worker index in cli mode
1 parent 9e635b9 commit 5c27c8a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/container.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Container {
8989
container.support.I = mod
9090
}
9191
} catch (e) {
92-
throw new Error(`Could not include object I: ${e.message}`)
92+
throw e
9393
}
9494
} else {
9595
// Create default actor - this sets up the callback in asyncHelperPromise
@@ -847,7 +847,9 @@ async function loadSupportObject(modulePath, supportObjectName) {
847847

848848
throw new Error(`Support object "${supportObjectName}" should be an object, class, or function, but got ${typeof actualObj}`)
849849
} catch (err) {
850-
throw new Error(`Could not include object ${supportObjectName} from module '${modulePath}'\n${err.message}\n${err.stack}`)
850+
const newErr = new Error(`Could not include object ${supportObjectName} from module '${modulePath}': ${err.message}`)
851+
newErr.stack = err.stack
852+
throw newErr
851853
}
852854
}
853855

0 commit comments

Comments
 (0)