Replaced throw with Log where possible

This commit is contained in:
Birunthan Mohanathas
2012-04-06 19:54:20 +03:00
parent df61f5c1f8
commit ea67809d9b
10 changed files with 46 additions and 136 deletions

View File

@ -623,13 +623,8 @@ void CTintedImage::ReadConfig(CConfigParser& parser, const WCHAR* section)
if (m_CropMode < CROPMODE_TL || m_CropMode > CROPMODE_C)
{
std::wstring error = m_ConfigArray[ConfigIndexImageCrop];
error += L'=';
error += crop;
error += L" (origin) is not valid in [";
error += section;
error += L']';
throw CError(error);
m_CropMode = CROPMODE_TL;
LogWithArgs(LOG_ERROR, L"%s=%s (origin) is not valid in [%s]", m_ConfigArray[ConfigIndexImageCrop], crop, section);
}
}
}
@ -731,13 +726,7 @@ void CTintedImage::ReadConfig(CConfigParser& parser, const WCHAR* section)
}
else
{
std::wstring error = m_ConfigArray[ConfigIndexImageFlip];
error += L'=';
error += flip;
error += L" is not valid in [";
error += section;
error += L']';
throw CError(error);
LogWithArgs(LOG_ERROR, L"%s=%s (origin) is not valid in [%s]", m_ConfigArray[ConfigIndexImageFlip], flip, section);
}
if (!m_DisableTransform)