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

Wrap the entire search logic in a try/catch statement

This should effectively turn script-terminating errors into just warnings and
thus at least working-around issue #397: the exceptions will be logged as
warnings intead of errors, but still logged.
parent 0b782f45
Branches
Tags
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -1851,6 +1851,7 @@ function do_search(args, uid)
var result=[];
var offsets=index.offsets;
try {
function get_func(args)
{
var next1,next2;
......@@ -2095,6 +2096,9 @@ function do_search(args, uid)
}
untagged("SEARCH "+result.join(" "));
} catch(error) {
log(LOG_WARNING, "Exception during search: " + error);
}
}
var selected_command_handlers = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment