From: svost Date: Fri, 6 May 2016 06:55:53 +0000 (+0300) Subject: Work around coverity CID 102373 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=8f0359f19ed7528c5f4981b8a1783b8f87ded62b Work around coverity CID 102373 --- diff --git a/src/ui_interface.h b/src/ui_interface.h index d62e64b..c56bb30 100644 --- a/src/ui_interface.h +++ b/src/ui_interface.h @@ -105,8 +105,14 @@ extern CClientUIInterface uiInterface; */ inline std::string _(const char* psz) { - boost::optional rv = uiInterface.Translate(psz); - return rv ? (*rv) : psz; + try { + boost::optional rv = uiInterface.Translate(psz); + return rv ? (*rv) : psz; + } + catch (const boost::bad_function_call& e) { + printf("Warning: %s in %s:%d\n", e.what(), __FILE__, __LINE__); + return psz; + } } #endif