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:
@@ -150,7 +150,8 @@ const removeClient = async (
|
||||
servers,
|
||||
serversKey: key,
|
||||
} = parseClientConfiguration(original, client.format));
|
||||
} catch {
|
||||
} catch (cause: unknown) {
|
||||
void cause;
|
||||
return item(
|
||||
client.name,
|
||||
"failed",
|
||||
@@ -172,7 +173,8 @@ const removeClient = async (
|
||||
const backupPath = `${client.configPath}.rea.backup`;
|
||||
try {
|
||||
await fileSystem.copy(transactionPath, backupPath);
|
||||
} catch {
|
||||
} catch (cause: unknown) {
|
||||
void cause;
|
||||
return item(
|
||||
client.name,
|
||||
"failed",
|
||||
@@ -200,10 +202,13 @@ const removeClient = async (
|
||||
"removed",
|
||||
`Removed registration from ${client.configPath}.`,
|
||||
);
|
||||
} catch {
|
||||
} catch (cause: unknown) {
|
||||
// Update failure attempts a restore before reporting; cause is preserved below.
|
||||
void cause;
|
||||
try {
|
||||
await fileSystem.writeText(transactionPath, original);
|
||||
} catch {
|
||||
} catch (restoreCause: unknown) {
|
||||
void restoreCause;
|
||||
return item(
|
||||
client.name,
|
||||
"failed",
|
||||
|
||||
Reference in New Issue
Block a user