Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 73951a7

Browse files
committed
Added error capture to regular error event
1 parent 539e68a commit 73951a7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

main.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ var start_local_server = function() {
174174
});
175175
subpy.on('error', function (err) {
176176
console.log('Python error %s', String(err));
177+
fs.appendFile(__dirname + path.sep + "python_error.log", String(err), function(error) {
178+
if(error) {
179+
return console.log(error);
180+
}
181+
});
177182
});
178183
subpy.on('close', function (code) {
179184
console.log('exited with ' + code);
@@ -698,4 +703,4 @@ app.on('open-url', function(event, uri) {
698703
// some cleanup when our app is exiting
699704
process.on('exit', () => {
700705
kill_local_server();
701-
});
706+
});

0 commit comments

Comments
 (0)