diff options
author | Matt Godbolt <matt@godbolt.org> | 2018-03-28 03:31:49 -0500 |
---|---|---|
committer | Matt Godbolt <matt@godbolt.org> | 2018-03-28 03:31:49 -0500 |
commit | 9ab527aa9a8bc32cf3daf6fe6df3df526946f554 (patch) | |
tree | 9c0c97eb8b03381d73644a5f2a1d4d06c1d2f33c /lib/compilers/ldc.js | |
parent | f9fd86fc248ea3dc95bb440803fd41d990d3db12 (diff) | |
download | compiler-explorer-9ab527aa9a8bc32cf3daf6fe6df3df526946f554.tar.gz compiler-explorer-9ab527aa9a8bc32cf3daf6fe6df3df526946f554.zip |
Handle case where ldc fails dueing AST generation
Diffstat (limited to 'lib/compilers/ldc.js')
-rw-r--r-- | lib/compilers/ldc.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/compilers/ldc.js b/lib/compilers/ldc.js index 1c050fa23..1dc4039f4 100644 --- a/lib/compilers/ldc.js +++ b/lib/compilers/ldc.js @@ -73,6 +73,9 @@ class LDCCompiler extends BaseCompiler { } loadASTOutput(output) { + if (output.code !== 0) { + return `Error generating AST: ${output.code}`; + } // Load the AST output from the `.cg` file. // Demangling is not needed. const astFilename = output.inputFilename.concat(".cg"); |