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

Function reportAnalyzerTerminatedWithError

src/extension/utils/misc.ts:10–24  ·  view source on GitHub ↗
(logger: Logger, duringStartup = false)

Source from the content-addressed store, hash-verified

8let isShowingAnalyzerError = false;
9
10export function reportAnalyzerTerminatedWithError(logger: Logger, duringStartup = false) {
11 if (isShowingAnalyzerError)
12 return;
13 isShowingAnalyzerError = true;
14 const prompt = duringStartup
15 ? "The Dart Analyzer could not be started."
16 : "The Dart Analyzer has terminated. Please [file an issue on GitHub](https://github.com/dart-lang/sdk/issues/new/choose) with any error from the end of the log.";
17 void promptToReloadExtension(logger, {
18 prompt,
19 offerLog: true,
20 severity: "ERROR",
21 specificLog: config.analyzerLogFile,
22 restartReason: ExtensionRestartReason.AnalyzerTerminated,
23 }).then(() => isShowingAnalyzerError = false);
24}
25
26export async function getFlutterConfigValue<T>(logger: Logger, flutterSdkPath: string | undefined, folder: string, flutterConfigKey: string): Promise<T> {
27 if (!flutterSdkPath) {

Callers 1

spawnServerMethod · 0.90

Calls 1

promptToReloadExtensionFunction · 0.90

Tested by

no test coverage detected