mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-25 11:57:19 +00:00
Attempt to fix failing tests
I didn't notice to change the exception type here to invalid_argument after daeaa479206b.
This commit is contained in:
parent
600dd92826
commit
eb9614aa05
@ -451,7 +451,7 @@ void read_locations(const config& cfg, std::vector<map_location>& locs)
|
||||
const std::vector<std::string> yvals = utils::split(cfg["y"]);
|
||||
|
||||
if (xvals.size() != yvals.size()) {
|
||||
throw bad_lexical_cast();
|
||||
throw std::invalid_argument("Number of x and y coordinates do not match.");
|
||||
}
|
||||
|
||||
std::transform(xvals.begin(), xvals.end(), yvals.begin(), std::back_inserter(locs), &read_locations_helper);
|
||||
|
@ -261,7 +261,7 @@ SYNCED_COMMAND_HANDLER_FUNCTION(move, child, use_undo, show, error_handler)
|
||||
|
||||
try {
|
||||
read_locations(child,steps);
|
||||
} catch (bad_lexical_cast &) {
|
||||
} catch (std::invalid_argument&) {
|
||||
WRN_REPLAY << "Warning: Path data contained something which could not be parsed to a sequence of locations:" << "\n config = " << child.debug() << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user