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:
Charles Dang 2016-11-07 09:03:56 +11:00
parent 600dd92826
commit eb9614aa05
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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;
}