Remove an incorrect error message

This commit is contained in:
Thomas Goyne 2014-12-13 08:19:17 -08:00
parent 879788fe83
commit e72ab0eda8
1 changed files with 4 additions and 22 deletions

View File

@ -321,17 +321,11 @@ void IconvWrapper::Convert(const char *src, size_t srcLen, std::string &dest) {
if (res == iconv_failed) { if (res == iconv_failed) {
switch (errno) { switch (errno) {
case EILSEQ:
case EINVAL: case EINVAL:
throw BadInput( throw BadInput(
"One or more characters in the input string were not valid " "One or more characters in the input string were not valid "
"characters in the given input encoding"); "characters in the given input encoding");
case EILSEQ:
throw BadOutput(
"One or more characters could not be converted to the "
"selected target encoding and the version of iconv "
"Aegisub was built with does not have useful fallbacks. "
"For best results, please build Aegisub using a recent "
"version of GNU iconv.");
default: default:
throw ConversionFailure("An unknown conversion failure occurred"); throw ConversionFailure("An unknown conversion failure occurred");
} }
@ -352,16 +346,10 @@ size_t IconvWrapper::Convert(const char* source, size_t sourceSize, char *dest,
"Destination buffer was not large enough to fit converted " "Destination buffer was not large enough to fit converted "
"string."); "string.");
case EINVAL: case EINVAL:
case EILSEQ:
throw BadInput( throw BadInput(
"One or more characters in the input string were not valid " "One or more characters in the input string were not valid "
"characters in the given input encoding"); "characters in the given input encoding");
case EILSEQ:
throw BadOutput(
"One or more characters could not be converted to the "
"selected target encoding and the version of iconv "
"Aegisub was built with does not have useful fallbacks. "
"For best results, please build Aegisub using a recent "
"version of GNU iconv.");
default: default:
throw ConversionFailure("An unknown conversion failure occurred"); throw ConversionFailure("An unknown conversion failure occurred");
} }
@ -394,18 +382,12 @@ size_t IconvWrapper::RequiredBufferSize(const char* src, size_t srcLen) {
if (res == iconv_failed) { if (res == iconv_failed) {
switch (errno) { switch (errno) {
case EINVAL: case EINVAL:
case EILSEQ:
throw BadInput( throw BadInput(
"One or more characters in the input string were not valid " "One or more characters in the input string were not valid "
"characters in the given input encoding"); "characters in the given input encoding");
case EILSEQ:
throw BadOutput(
"One or more characters could not be converted to the "
"selected target encoding and the version of iconv "
"Aegisub was built with does not have useful fallbacks. "
"For best results, please build Aegisub using a recent "
"version of GNU iconv.");
default: default:
throw ConversionFailure("An unknown conversion failure occured"); throw ConversionFailure("An unknown conversion failure occurred");
} }
} }
return charsWritten; return charsWritten;