From 70b107ca8bb7575bb5c7861b17788e217d12f71d Mon Sep 17 00:00:00 2001 From: Alex Hansen Date: Tue, 24 Oct 2023 11:49:57 -0700 Subject: [PATCH] Improve diagnostic message when QIR codegen fails due to a runtime error (#809) This change includes the error string from runtime errors in the pop-up error dialog when QIR generation fails. image Closes #747 --- vscode/src/qirGeneration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/src/qirGeneration.ts b/vscode/src/qirGeneration.ts index 02cba8b83a..69e56b323e 100644 --- a/vscode/src/qirGeneration.ts +++ b/vscode/src/qirGeneration.ts @@ -73,7 +73,7 @@ export async function getQirForActiveWindow(): Promise { } catch (e: any) { log.error("Codegen error. ", e.toString()); throw new QirGenerationError( - "Code generation failed. Please ensure the code is compatible with the QIR base profile " + + `Code generation failed due to error: "${e.toString()}". Please ensure the code is compatible with the QIR base profile ` + "by setting the target QIR profile to 'base' and fixing any errors." ); } finally {