Skip to content
Snippets Groups Projects
Commit 1dec0195 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Add filename and line number to exception catch log messages.

parent 3a0d88ac
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -2012,7 +2012,9 @@ rescan: ...@@ -2012,7 +2012,9 @@ rescan:
ret = handle(args); ret = handle(args);
} }
catch(e) { catch(e) {
log(LOG_ERROR, (new Date()).toString() + ", Node "+dk.connection.node+": REF Error "+e.message+" at "+efile+":"+eline); log(LOG_ERROR, (new Date()).toString() + ", Node "+dk.connection.node
+" "+e.fileName+" line "+e.lineNumber
+": REF Error "+e.message+" at "+efile+":"+eline);
} }
if (typeof ret === 'object') { if (typeof ret === 'object') {
if (ret.itemexit) if (ret.itemexit)
...@@ -4388,7 +4390,9 @@ function load_time() ...@@ -4388,7 +4390,9 @@ function load_time()
run_ref('maint', 'maint.ref'); run_ref('maint', 'maint.ref');
} }
catch(e) { catch(e) {
log(LOG_ERROR, (new Date()).toString() + ", Node "+dk.connection.node+": REF Error "+e.message+" at maint"); log(LOG_ERROR, (new Date()).toString() + ", Node "+dk.connection.node
+" "+e.fileName+" line "+e.lineNumber
+": REF Error "+e.message+" at maint");
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment