mirror of
https://github.com/morluto/rea.git
synced 2026-11-16 11:43:20 +00:00
refactor(application): build application cancellations with a required reason (#10574)
* refactor(application): build application cancellations with a required reason Migrate every AnalysisCancelledError construction under src/application to cancelledBy and lower the guard baseline from 671 to 442. Shutdown refusals in BinarySession report OwnerCancellation.ownerClosed when the caller did not abort, instead of an undefined reason. ReverseEngineeringService and DesktopBuildOwnedWork close their work with the typed owner reason. SharedStartupAttempt returns the departing caller's reason with a cancelled wait. One shared isAborted predicate replaces eleven local copies and narrows a checked signal for cancelledBy. * refactor(desktop): drop an unused cancellation import from desktop capture state
This commit is contained in:
1 parent
0ddc732c69
commit
2826592759
86 files changed
+554
-1012
No files matched your search
@@ -7,10 +7,10 @@ import {
|
||||
type AnalysisError,
|
||||
} from "../domain/analysisErrorBase.js";
|
||||
import {
|
||||
AnalysisCancelledError,
|
||||
AnalysisCapabilityUnavailableError,
|
||||
AnalysisInputError,
|
||||
AnalysisOutputError,
|
||||
cancelledBy,
|
||||
} from "../domain/analysisErrorCore.js";
|
||||
import { createEvidence, type Evidence } from "../domain/evidence.js";
|
||||
import { jsonObjectSchema } from "../domain/jsonValue.js";
|
||||
@@ -157,11 +157,7 @@ export class WebModuleTraceService {
|
||||
let resolutionFailure: AnalysisError | undefined;
|
||||
if (literals.length > 0) {
|
||||
if (options?.signal?.aborted)
|
||||
return incomplete(
|
||||
new AnalysisCancelledError(OPERATION, {
|
||||
cause: options.signal.reason,
|
||||
}),
|
||||
);
|
||||
return incomplete(cancelledBy(OPERATION, options.signal));
|
||||
const request = {
|
||||
importerUrl,
|
||||
importMap:
|
||||
|
||||
Reference in new issue
Block a user