summarylogtreecommitdiffstats
path: root/ps-silent-catch_all.patch
diff options
context:
space:
mode:
authorxsmile2018-06-04 15:20:31 +0200
committerxsmile2018-06-04 15:20:31 +0200
commitd5f9faa36269d5ce2144d93ab4622f3d67e102fb (patch)
treeee3300867bac5924804e985b1105a1425580ecb8 /ps-silent-catch_all.patch
parent8a6e454d1f806fd9e7ca74d922b24e76e7a5e79e (diff)
downloadaur-d5f9faa36269d5ce2144d93ab4622f3d67e102fb.tar.gz
update
Diffstat (limited to 'ps-silent-catch_all.patch')
-rw-r--r--ps-silent-catch_all.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/ps-silent-catch_all.patch b/ps-silent-catch_all.patch
new file mode 100644
index 000000000000..7ae1ea945c68
--- /dev/null
+++ b/ps-silent-catch_all.patch
@@ -0,0 +1,18 @@
+--- a/src/command_dynamic.cc
++++ b/src/command_dynamic.cc
+@@ -425,10 +425,14 @@ system_method_list_keys(const torrent::Object::string_type& args) {
+
+ torrent::Object
+ cmd_catch(rpc::target_type target, const torrent::Object& args) {
++ bool silent = (args.is_list()
++ && !args.as_list().empty()
++ && args.as_list().front().is_string()
++ && args.as_list().front().as_string() == "false=");
+ try {
+ return rpc::call_object(args, target);
+ } catch (torrent::input_error& e) {
+- lt_log_print(torrent::LOG_WARN, "Caught exception: '%s'.", e.what());
++ if (!silent) lt_log_print(torrent::LOG_WARN, "Caught exception: '%s'.", e.what());
+ return torrent::Object();
+ }
+ }