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:
@@ -240,7 +240,9 @@ const pathBelowUrlPrefix = (prefix: string, value: string): string | null => {
|
||||
try {
|
||||
base = new URL(prefix);
|
||||
candidate = new URL(value);
|
||||
} catch {
|
||||
} catch (cause: unknown) {
|
||||
// Invalid input is represented by the null return.
|
||||
void cause;
|
||||
return null;
|
||||
}
|
||||
if (
|
||||
@@ -252,7 +254,9 @@ const pathBelowUrlPrefix = (prefix: string, value: string): string | null => {
|
||||
return normalizeArtifactPath(
|
||||
decodeURIComponent(candidate.pathname.slice(base.pathname.length)),
|
||||
);
|
||||
} catch {
|
||||
} catch (cause: unknown) {
|
||||
// Undecodable path segments are represented by the null return.
|
||||
void cause;
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user