From 6fd8a106e3e807d217afe7b610e5c9b9204b9407 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Thu, 26 Jun 2014 12:15:57 -0400 Subject: [PATCH] pep8analysis: report fatal crash of the tool MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- contrib/pep8analysis/www/index.html | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/contrib/pep8analysis/www/index.html b/contrib/pep8analysis/www/index.html index 73608ef..047ad27 100644 --- a/contrib/pep8analysis/www/index.html +++ b/contrib/pep8analysis/www/index.html @@ -47,7 +47,14 @@ // Invoke the full Nit program Module = Pep8Module - ret = Module['callMain']([input]) + try { + ret = Module['callMain']([input]) + } catch(e) { + console.debug("Tool invocation failed, with:\n" + $("#console").text() + "\n" + e ) + ga('trackEvent', 'Crash', 'Analysis', $("#console").text()) + $("#fatal-error").show() + $("#analyze").prop('disabled', true) + } // Show and set color of output console $("#consolePanel").removeClass("panel-success panel-warning panel-danger") @@ -112,6 +119,10 @@
Loading the tool... This may take some time.
+
-- 1.7.9.5