diff --git a/src/backend/electron/manager/engineInfoManager.ts b/src/backend/electron/manager/engineInfoManager.ts index 82147b314c..93b5b929a6 100644 --- a/src/backend/electron/manager/engineInfoManager.ts +++ b/src/backend/electron/manager/engineInfoManager.ts @@ -15,7 +15,6 @@ import { minimumEngineManifestSchema, } from "@/type/preload"; import { AltPortInfos } from "@/store/type"; -import { UnreachableError } from "@/type/utility"; import { loadEnvEngineInfos } from "@/domain/defaultEngine/envEngineInfo"; import { failure, Result, success } from "@/type/result"; @@ -47,11 +46,10 @@ export class EngineInfoManager { JSON.parse(fs.readFileSync(manifestPath, { encoding: "utf8" })), ); } catch (e) { - if (e instanceof Error) { - return failure("manifestParseError", e); - } else { - throw new UnreachableError(); - } + return failure( + "manifestParseError", + e instanceof Error ? e : new Error("manifest parse error"), + ); } const [command, ...args] = shlex.split(manifest.command);