MCPcopy Create free account
hub / github.com/apache/maka / isExecutionCancellation

Function isExecutionCancellation

packages/runtime/src/runtime-kernel.ts:3780–3793  ·  view source on GitHub ↗
(
  error: unknown,
  cancellation: RuntimeExecutionCancellation,
)

Source from the content-addressed store, hash-verified

3778}
3779
3780function isExecutionCancellation(
3781 error: unknown,
3782 cancellation: RuntimeExecutionCancellation,
3783): boolean {
3784 const seen = new Set<unknown>();
3785 let current = error;
3786 while (current !== null && (typeof current === 'object' || typeof current === 'function')) {
3787 if (current === cancellation) return true;
3788 if (seen.has(current)) return false;
3789 seen.add(current);
3790 current = 'cause' in current ? current.cause : undefined;
3791 }
3792 return false;
3793}
3794
3795class FailureCollector {
3796 private readonly failures: unknown[] = [];

Callers 1

Calls 2

hasMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected