Files
start-os/sdk/lib/util/asError.ts
Jade c704626a39 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
2024-08-14 11:16:23 -06:00

7 lines
133 B
TypeScript

export const asError = (e: unknown) => {
if (e instanceof Error) {
return new Error(e as any)
}
return new Error(`${e}`)
}