Fix/overlay destroy (#2707)

* feature: Make all errors in console.error be including an error for that stack tract

* feature: Make all errors in console.error be including an error for that stack tract

* fix: Add the tinisubreaper for the subreapers to know they are not the reaper

* fix: overlay always destroyed

* chore: Move the style of destroy to just private
This commit is contained in:
Jade
2024-08-14 11:16:23 -06:00
committed by GitHub
parent 7ef25a3816
commit c704626a39
19 changed files with 261 additions and 137 deletions

View File

@@ -4,7 +4,7 @@ import matches, { any, number, object, string, tuple } from "ts-matches"
import { Effects } from "../../Models/Effects"
import { RpcResult, matchRpcResult } from "../RpcListener"
import { duration } from "../../Models/Duration"
import { T } from "@start9labs/start-sdk"
import { T, utils } from "@start9labs/start-sdk"
import { Volume } from "../../Models/Volume"
import { MainEffects } from "@start9labs/start-sdk/cjs/lib/StartSdk"
import { CallbackHolder } from "../../Models/CallbackHolder"
@@ -57,7 +57,9 @@ export class SystemForStartOs implements System {
if (this.runningMain) {
this.runningMain.callbacks
.callCallback(callback, args)
.catch((error) => console.error(`callback ${callback} failed`, error))
.catch((error) =>
console.error(`callback ${callback} failed`, utils.asError(error)),
)
} else {
console.warn(`callback ${callback} ignored because system is not running`)
}