Skip to content

Commit

Permalink
Merge pull request #12399 from Rechi/coverityFmtException
Browse files Browse the repository at this point in the history
[utils] coverity: ignore uncaught 'fmt::FormatError' exception
  • Loading branch information
Rechi committed Jul 6, 2017
2 parents 42c731a + 7741d82 commit 6dbfa7c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xbmc/utils/StringUtils.h
Expand Up @@ -63,6 +63,7 @@ class StringUtils
template<typename... Args>
static std::string Format(const std::string& fmt, Args&&... args)
{
// coverity[fun_call_w_exception : FALSE]
auto result = fmt::format(fmt, std::forward<Args>(args)...);
if (result == fmt)
result = fmt::sprintf(fmt, std::forward<Args>(args)...);
Expand All @@ -72,6 +73,7 @@ class StringUtils
template<typename... Args>
static std::wstring Format(const std::wstring& fmt, Args&&... args)
{
// coverity[fun_call_w_exception : FALSE]
auto result = fmt::format(fmt, std::forward<Args>(args)...);
if (result == fmt)
result = fmt::sprintf(fmt, std::forward<Args>(args)...);
Expand Down

0 comments on commit 6dbfa7c

Please sign in to comment.