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:
@@ -162,8 +162,9 @@ export const decodeAppleDispatchMetadata = (
|
||||
let fileOffset: number | null = null;
|
||||
try {
|
||||
fileOffset = offset(target);
|
||||
} catch {
|
||||
/* serialized target remains unresolved */
|
||||
} catch (cause: unknown) {
|
||||
// best-effort cleanup: serialized target remains unresolved.
|
||||
void cause;
|
||||
}
|
||||
if (admit())
|
||||
result.relative_pointers.push({
|
||||
@@ -204,8 +205,9 @@ export const decodeAppleDispatchMetadata = (
|
||||
"Method implementation is not in an executable segment",
|
||||
);
|
||||
implementationLocation = location(implementation);
|
||||
} catch {
|
||||
/* external/chained pointers remain unresolved */
|
||||
} catch (cause: unknown) {
|
||||
// best-effort cleanup: external/chained pointers remain unresolved.
|
||||
void cause;
|
||||
}
|
||||
result.objc_dispatch_implementations.push({
|
||||
class_name: className,
|
||||
@@ -269,7 +271,9 @@ export const decodeAppleDispatchMetadata = (
|
||||
superclassName = string(
|
||||
pointer((pointer(superclass + 32n) & ~7n) + 24n),
|
||||
);
|
||||
} catch {
|
||||
} catch (cause: unknown) {
|
||||
// Superclass resolution failure is recorded; the cause adds no identity.
|
||||
void cause;
|
||||
failures.push(
|
||||
`Superclass pointer ${hex(superclass)} of ${name} requires unsupported binding/fixup resolution`,
|
||||
);
|
||||
@@ -294,7 +298,9 @@ export const decodeAppleDispatchMetadata = (
|
||||
let value: number | null = null;
|
||||
try {
|
||||
value = u32(encodedOffset);
|
||||
} catch {
|
||||
} catch (cause: unknown) {
|
||||
// Unresolved offsets are recorded; the cause adds no identity.
|
||||
void cause;
|
||||
failures.push(`Unresolved ivar offset pointer ${hex(encodedOffset)}`);
|
||||
}
|
||||
result.objc_ivars.push({
|
||||
|
||||
@@ -190,7 +190,9 @@ const observeWithHelper = async (
|
||||
signal.addEventListener("abort", abort, { once: true });
|
||||
if (signal.aborted) abort();
|
||||
});
|
||||
} catch {
|
||||
} catch (cause: unknown) {
|
||||
// Cancellation is recorded as a cancelled outcome.
|
||||
void cause;
|
||||
results.push({
|
||||
index,
|
||||
kind: step.kind,
|
||||
|
||||
Reference in New Issue
Block a user