mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-21 20:44:24 +00:00
Improved console output on IPF fail
Yes, I know the duplicate code should be consolidated. (cherry-picked from commit b746829692b702b7c3fc83726c16b0c789ad8651)
This commit is contained in:
parent
56406aeedc
commit
0546b5162f
@ -625,10 +625,17 @@ static surface load_image_sub_file(const image::locator& loc)
|
||||
try {
|
||||
surf = (*mod)(surf);
|
||||
} catch(const image::modification::imod_exception& e) {
|
||||
std::ostringstream ss;
|
||||
ss << "\n";
|
||||
|
||||
for(const std::string& mod : utils::parenthetical_split(loc.get_modifications(), '~')) {
|
||||
ss << "\t" << mod << "\n";
|
||||
}
|
||||
|
||||
ERR_CFG << "Failed to apply a modification to an image:\n"
|
||||
<< "Image: " << loc.get_filename() << ".\n"
|
||||
<< "Modifications: " << loc.get_modifications() << ".\n"
|
||||
<< "Error: " << e.message;
|
||||
<< "Image: " << loc.get_filename() << "\n"
|
||||
<< "Modifications: " << ss.str() << "\n"
|
||||
<< "Error: " << e.message << "\n";
|
||||
}
|
||||
|
||||
// NOTE: do this *after* applying the mod or you'll get crashes!
|
||||
|
Loading…
x
Reference in New Issue
Block a user