Skip to content
Snippets Groups Projects
Commit 0e809388 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Log exceptions to stdout as well as log file.

parent 04b855c5
No related branches found
No related tags found
No related merge requests found
...@@ -69,6 +69,7 @@ function run_tests(location, obj) ...@@ -69,6 +69,7 @@ function run_tests(location, obj)
if (obj.tests !== undefined) { if (obj.tests !== undefined) {
obj.tests.forEach(function(testscript) { obj.tests.forEach(function(testscript) {
var tfailed = false; var tfailed = false;
var fail_msg = '';
try { try {
var dir = testscript; var dir = testscript;
...@@ -78,15 +79,18 @@ function run_tests(location, obj) ...@@ -78,15 +79,18 @@ function run_tests(location, obj)
chdir(js.exec_dir); chdir(js.exec_dir);
if (result instanceof Error) { if (result instanceof Error) {
tfailed = true; tfailed = true;
fail_msg = e;
log("Caught: "+result); log("Caught: "+result);
} }
} }
catch(e) { catch(e) {
tfailed = true; tfailed = true;
fail_msg = e;
log("Caught: "+e); log("Caught: "+e);
} }
if (tfailed) { if (tfailed) {
stdout.writeln("FAILED!"); stdout.writeln("FAILED!");
stdout.writeln(e);
stdout.writeln(""); stdout.writeln("");
failed++; failed++;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment