MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / raceIgnoringErrors

Function raceIgnoringErrors

src/debug/dart_debug_impl.ts:480–488  ·  view source on GitHub ↗
(action: () => Promise<any>, timeoutMilliseconds = 250)

Source from the content-addressed store, hash-verified

478 // Run some code, but don't wait longer than a certain time period for the result
479 // as it may never come. Returns true if the operation completed.
480 private async raceIgnoringErrors(action: () => Promise<any>, timeoutMilliseconds = 250): Promise<boolean> {
481 try {
482 await this.withTimeout(action(), timeoutMilliseconds);
483 return true;
484 } catch (e) {
485 this.log(`Error while while waiting for action: ${e}`);
486 return false;
487 }
488 }
489
490 protected async terminateRequest(
491 response: DebugProtocol.TerminateResponse,

Callers

nothing calls this directly

Calls 1

logMethod · 0.45

Tested by

no test coverage detected