Skip to content

Commit 4e19de8

Browse files
committed
Make error messages get reported
If you use the finally statement, the error gets thrown after the code in the`finally` block has been executed, so this is not read by the reading code
1 parent 2bfec6f commit 4e19de8

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

cwltool/cwlNodeEngine.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ process.stdin.on("data", function(chunk) {
1010
incoming = incoming.substr(i+1);
1111
process.stdout.write(JSON.stringify(require("vm").runInNewContext(fn, {})) + "\n");
1212
}
13-
finally{
14-
/*strings to indicate the process has finished*/
15-
console.log("r1cepzbhUTxtykz5XTC4");
16-
console.error("r1cepzbhUTxtykz5XTC4");
13+
catch(e){
14+
console.error(e)
1715
}
16+
/*strings to indicate the process has finished*/
17+
console.log("r1cepzbhUTxtykz5XTC4");
18+
console.error("r1cepzbhUTxtykz5XTC4");
1819
}
1920
});
2021
process.stdin.on("end", process.exit);

cwltool/cwlNodeEngineJSConsole.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ process.stdin.on("data", function(chunk) {
2121
}
2222
})) + "\n");
2323
}
24-
finally{
25-
/*strings to indicate the process has finished*/
26-
console.log("r1cepzbhUTxtykz5XTC4");
27-
console.error("r1cepzbhUTxtykz5XTC4");
24+
catch(e){
25+
console.error(e)
2826
}
27+
/*strings to indicate the process has finished*/
28+
console.log("r1cepzbhUTxtykz5XTC4");
29+
console.error("r1cepzbhUTxtykz5XTC4");
2930
}
3031
});
3132
process.stdin.on("end", process.exit);

0 commit comments

Comments
 (0)