refactor(runtime): name all silent catch causes without changing diagnostics (#637)
* refactor(domain): split error taxonomy into thematic modules Move each error family out of domain/errors.ts into its own module (base, core, provider selection/adapter, browser observation, artifact, evidence, unknown registry, hopper, configuration) and relocate AnalysisErrorProjection to analysisErrorProjection. Migrate all 162 importers to the owning modules and delete errors.ts. No re-export shims; behavior is unchanged. * refactor(runtime): name all silent catch causes without changing diagnostics Bind cause in every bare catch and unhandled rejection across src/. Real failures preserve the cause for logging; best-effort cleanup carries an explicit comment. Caller-visible and Evidence strings are byte-identical to before.
This commit is contained in:
1 parent
735c10059c
commit
5f27e02fae
65 files changed
+363
-131
No files matched your search
@@ -430,7 +430,9 @@ const packageEntry = (
|
||||
if (entry === undefined) return { status: "missing" };
|
||||
const legacy = packagePathValue(entry);
|
||||
return legacy.status === "value" ? { ...legacy, source: "legacy" } : legacy;
|
||||
} catch {
|
||||
} catch (cause: unknown) {
|
||||
// Reflect-based manifest reads fail closed as invalid.
|
||||
void cause;
|
||||
return { status: "invalid" };
|
||||
}
|
||||
};
|
||||
@@ -545,7 +547,9 @@ const fileUrlPath = (value: string): string | undefined => {
|
||||
const url = new URL(value);
|
||||
if (url.protocol !== "file:" || url.hostname !== "") return undefined;
|
||||
return decodeURIComponent(url.pathname).replace(/^\/+/, "");
|
||||
} catch {
|
||||
} catch (cause: unknown) {
|
||||
// Unparseable file URLs have no path to resolve.
|
||||
void cause;
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user