Skip to content

Commit 70b107c

Browse files
authored
Improve diagnostic message when QIR codegen fails due to a runtime error (microsoft#809)
This change includes the error string from runtime errors in the pop-up error dialog when QIR generation fails. <img alt="image" src="https://github.com/microsoft/qsharp/assets/12157751/4784f746-01ef-45cb-acdb-19939a0cbc18"> Closes microsoft#747
1 parent a153981 commit 70b107c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vscode/src/qirGeneration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export async function getQirForActiveWindow(): Promise<string> {
7373
} catch (e: any) {
7474
log.error("Codegen error. ", e.toString());
7575
throw new QirGenerationError(
76-
"Code generation failed. Please ensure the code is compatible with the QIR base profile " +
76+
`Code generation failed due to error: "${e.toString()}". Please ensure the code is compatible with the QIR base profile ` +
7777
"by setting the target QIR profile to 'base' and fixing any errors."
7878
);
7979
} finally {

0 commit comments

Comments
 (0)