Skip to content

Commit

Permalink
add extra debugging help
Browse files Browse the repository at this point in the history
  • Loading branch information
menduz committed Jun 5, 2022
1 parent 069381a commit d74f912
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dist
node_modules
temp
*.tgz
*.tgz
.vscode/settings.json
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"makefile.extensionOutputFolder": "./.vscode"
}
2 changes: 2 additions & 0 deletions src/utils/lifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ function stopAllComponents(components: Record<string, IBaseComponent>) {
const pending: PromiseLike<any>[] = []
for (let c in components) {
const component = components[c]
if (!component) throw new Error('Component is null: ' + c)
if (component.stop && typeof component.stop == "function") {
pending.push(component.stop())
}
Expand Down Expand Up @@ -77,6 +78,7 @@ async function startComponentsLifecycle(components: Record<string, IBaseComponen
"' is a Promise, it should be an object, did you miss an await in the initComponents?. >>>\n"
)
}
if (!component) throw new Error('Null or empty components are not allowed: ' + c)
if (component.start && typeof component.start == "function") {
const awaitable = component.start(immutableStartOptions)
if (awaitable && typeof awaitable == "object" && "then" in awaitable) {
Expand Down

0 comments on commit d74f912

Please sign in to comment.