Skip to content

Commit

Permalink
Improve error message for failed metadata (#6598)
Browse files Browse the repository at this point in the history
  • Loading branch information
piotmag769 authored Nov 6, 2024
1 parent 70abf3a commit 2d2352f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions vscode-cairo/src/cairols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,14 @@ export async function setupLanguageServer(ctx: Context): Promise<lc.LanguageClie
);

client.onNotification(new lc.NotificationType("cairo/scarb-metadata-failed"), async () => {
const goToOutput = "Go to output";
const goToLogs = "Go to logs";

const selectedValue = await vscode.window.showErrorMessage("Scarb metadata failed", goToOutput);
const selectedValue = await vscode.window.showErrorMessage(
"`scarb metadata` failed. Check if your project builds correctly via `scarb build`.",
goToLogs,
);

if (selectedValue === goToOutput) {
if (selectedValue === goToLogs) {
client.outputChannel.show(true);
}
});
Expand Down

0 comments on commit 2d2352f

Please sign in to comment.