move comment to proper location, and note what excpetion is thrown
This commit is contained in:
parent
a0741b8ebd
commit
c26f2c9737
1 changed files with 3 additions and 1 deletions
|
@ -2856,9 +2856,11 @@ std::string CClaimTrieCache::normalizeClaimName(const std::string& name, bool fo
|
|||
initialized = true;
|
||||
}
|
||||
|
||||
// Check if it is a valid utf-8 string, if not, simply return the invalid string as is
|
||||
std::string normalized;
|
||||
try {
|
||||
|
||||
// Check if it is a valid utf-8 string. If not, it will throw a
|
||||
// boost::locale::conv::conversion_error exception which we catch later
|
||||
normalized = boost::locale::conv::to_utf<char>(name, "UTF-8", boost::locale::conv::stop);
|
||||
if (normalized.empty())
|
||||
return name;
|
||||
|
|
Loading…
Add table
Reference in a new issue