From 515093abd2e8f77e0c72c561e207f4f7c35e7403 Mon Sep 17 00:00:00 2001 From: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com> Date: Sun, 11 May 2025 00:46:16 +0100 Subject: [PATCH] Improve error message logged for config load error --- packages/controller/controller.ts | 2 +- packages/ctl/ctl.ts | 2 +- packages/host/host.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/controller/controller.ts b/packages/controller/controller.ts index 3aa41acf..f986423c 100644 --- a/packages/controller/controller.ts +++ b/packages/controller/controller.ts @@ -354,7 +354,7 @@ async function initialize(): Promise { controllerConfig = new lib.ControllerConfig("controller", undefined, controllerConfigPath); } else { - throw new lib.StartupError(`Failed to load ${controllerConfigPath}: ${err.message}`); + throw new lib.StartupError(`Failed to load ${controllerConfigPath}: ${err.stack ?? err.message ?? err}`); } } diff --git a/packages/ctl/ctl.ts b/packages/ctl/ctl.ts index 8945b500..f2fab5b7 100755 --- a/packages/ctl/ctl.ts +++ b/packages/ctl/ctl.ts @@ -222,7 +222,7 @@ async function startControl() { controlConfig = new lib.ControlConfig("control", undefined, controlConfigPath); } else { - throw new lib.StartupError(`Failed to load ${args.config}: ${err.message}`); + throw new lib.StartupError(`Failed to load ${args.config}: ${err.stack ?? err.message ?? err}`); } } diff --git a/packages/host/host.ts b/packages/host/host.ts index c40df9f1..6e6bb779 100755 --- a/packages/host/host.ts +++ b/packages/host/host.ts @@ -180,7 +180,7 @@ async function startHost() { hostConfig = new lib.HostConfig("host", undefined, hostConfigPath); } else { - throw new lib.StartupError(`Failed to load ${args.config}: ${err.message}`); + throw new lib.StartupError(`Failed to load ${args.config}: ${err.stack ?? err.message ?? err}`); } }