aboutsummaryrefslogtreecommitdiff
path: root/lib/compile-handler.js
diff options
context:
space:
mode:
authorMatt Godbolt <matt@godbolt.org>2017-11-21 22:14:30 -0600
committerMatt Godbolt <matt@godbolt.org>2017-11-21 22:52:58 -0600
commitcf407a85ef98e4d4b50ffeb21a40e3b2e5832b78 (patch)
treeb7a2eb805f62ee1c6c90cac1ee577820af23e759 /lib/compile-handler.js
parentfdaddd67c0084b592d1f3d9e35bd2dbe4808a99f (diff)
downloadcompiler-explorer-cf407a85ef98e4d4b50ffeb21a40e3b2e5832b78.tar.gz
compiler-explorer-cf407a85ef98e4d4b50ffeb21a40e3b2e5832b78.zip
Add some config parameters that come from AWS itself. Use it to configure raven (sentry.io) on the server
Diffstat (limited to 'lib/compile-handler.js')
-rw-r--r--lib/compile-handler.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/compile-handler.js b/lib/compile-handler.js
index 2266e7409..6d2ffd16c 100644
--- a/lib/compile-handler.js
+++ b/lib/compile-handler.js
@@ -32,7 +32,8 @@ var child_process = require('child_process'),
_ = require('underscore-node'),
logger = require('./logger').logger,
utils = require('./utils'),
- CompilationEnvironment = require('./compilation-env').CompilationEnvironment;
+ CompilationEnvironment = require('./compilation-env').CompilationEnvironment,
+ Raven = require('raven');
temp.track();
@@ -185,13 +186,15 @@ function CompileHandler(gccProps, compilerProps) {
if (!_.isEmpty(result.stdout)) res.write("\nStandard out:\n" + textify(result.stdout));
if (!_.isEmpty(result.stderr)) res.write("\nStandard error:\n" + textify(result.stderr));
} catch (ex) {
+ Raven.captureException(ex, {req: req});
re.write("Error handling request: " + ex);
}
res.end('\n');
}
},
function (error) {
- logger.error("Error", error);
+ logger.error("Error during compilation", error);
+ Raven.captureException(error, {req: req});
if (typeof(error) !== "string") {
if (error.code) {
if (typeof(error.stderr) === "string") {