Added hopefully more details in image parsing errors, ref #723

This commit is contained in:
emeric
2025-08-05 23:01:07 +02:00
parent 35ba66099f
commit 92a8194844
13 changed files with 41 additions and 33 deletions
@@ -41,12 +41,12 @@ namespace lms::image::GraphicsMagick
catch (Magick::Warning& e)
{
LMS_LOG(COVER, WARNING, "Caught Magick warning: " << e.what());
throw Exception{ std::string{ "Magick read warning: " } + e.what() };
throw Exception{ std::string{ "Read warning: " } + e.what() };
}
catch (Magick::Exception& e)
{
LMS_LOG(COVER, ERROR, "Caught Magick exception: " << e.what());
throw Exception{ std::string{ "Magick read error: " } + e.what() };
throw Exception{ std::string{ "Read error: " } + e.what() };
}
}
@@ -63,12 +63,12 @@ namespace lms::image::GraphicsMagick
catch (Magick::Warning& e)
{
LMS_LOG(COVER, WARNING, "Caught Magick warning: " << e.what());
throw Exception{ std::string{ "Magick read warning: " } + e.what() };
throw Exception{ std::string{ "Read warning: " } + e.what() };
}
catch (Magick::Exception& e)
{
LMS_LOG(COVER, ERROR, "Caught Magick exception: " << e.what());
throw Exception{ std::string{ "Magick read error: " } + e.what() };
throw Exception{ std::string{ "Read error: " } + e.what() };
}
}
@@ -93,7 +93,7 @@ namespace lms::image::GraphicsMagick
catch (Magick::Exception& e)
{
LMS_LOG(COVER, ERROR, "Caught Magick exception while resizing: " << e.what());
throw Exception{ std::string{ "Magick resize error: " } + e.what() };
throw Exception{ std::string{ "Resize error: " } + e.what() };
}
}