lib/icu/Converter: Create() throws exception on error

This commit is contained in:
Max Kellermann
2016-04-12 22:18:36 +02:00
parent 33fdaa5b6d
commit 01b68db30e
9 changed files with 45 additions and 45 deletions

View File

@@ -40,19 +40,17 @@ static std::string fs_charset;
static IcuConverter *fs_converter;
bool
SetFSCharset(const char *charset, Error &error)
void
SetFSCharset(const char *charset)
{
assert(charset != nullptr);
assert(fs_converter == nullptr);
fs_converter = IcuConverter::Create(charset, error);
if (fs_converter == nullptr)
return false;
fs_converter = IcuConverter::Create(charset);
assert(fs_converter != nullptr);
FormatDebug(path_domain,
"SetFSCharset: fs charset is: %s", fs_charset.c_str());
return true;
}
#endif