From 6a0b384d8fcd19baecdb56a988fcb4621e34adb3 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 11 Jan 2019 18:15:46 -0800 Subject: [PATCH] modules/console: Workaround https://github.com/facebook/rocksdb/issues/4878 --- modules/console.cc | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/modules/console.cc b/modules/console.cc index e4bda268f..ac7b15538 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -3528,12 +3528,16 @@ try (const string_view &prop) { const auto name(lstrip(prop, "rocksdb.")); - const auto val + size_t val(0); try { - c? + val = c? db::property(c, prop): - db::property(d, prop) - }; + db::property(d, prop); + } + catch(const std::exception &e) + { + log::derror{"%s", e.what()}; + } if(!!val) closeout(name, [&out, &val] { @@ -3545,12 +3549,16 @@ try (const string_view &prop) { const auto name(lstrip(prop, "rocksdb.")); - const auto val + size_t val(0); try { - c? + val = c? db::property(c, prop): - db::property(d, prop) - }; + db::property(d, prop); + } + catch(const std::exception &e) + { + log::derror{"%s", e.what()}; + } if(!!val) closeout(name, [&out, &val] {