From 09db69dab3ded3aee2d82d15d7c737c2379d3e47 Mon Sep 17 00:00:00 2001 From: Joshua Marinacci Date: Mon, 23 Jun 2014 11:12:43 -0700 Subject: [PATCH] check for toolchain install, report error to browser if missing --- compile.js | 2 ++ electron.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/compile.js b/compile.js index 536e704..4769cea 100644 --- a/compile.js +++ b/compile.js @@ -244,6 +244,8 @@ exports.compile = function(sketchPath, outdir,options, publish, sketchDir, final //console.log(args.join(' ')); publish({type:"compile", message:args.join(" ")}); } + + checkfile(options.platform.getCompilerBinaryPath()); debug("compiling ",sketchPath,"to dir",outdir); debug("root sketch dir = ",sketchDir); diff --git a/electron.js b/electron.js index 5ee5e07..3f94b65 100644 --- a/electron.js +++ b/electron.js @@ -104,7 +104,8 @@ app.post('/compile',function(req,res) { } catch(e) { console.log("compilation error",e); console.log(e.output); - res.send(JSON.stringify({status:'error',output:e.output})); + res.send(JSON.stringify({status:'error',output:e.output, message: e.toString()})); + publishEvent({ type:'error', message: e.toString(), output: e.output}); res.end(); } });