From 5a813a75412ac9b8fadb90c9abd46dd95aee8e9b Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 29 Apr 2021 14:17:08 -0400 Subject: Removed data files from repo --- src/utils.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/utils.h') diff --git a/src/utils.h b/src/utils.h index 156c88b..bdf7ddc 100644 --- a/src/utils.h +++ b/src/utils.h @@ -22,8 +22,9 @@ namespace utils { template std::shared_ptr loadDFromJson(const nlohmann::json& data) { try { return std::shared_ptr(new D(loadJson(data["type"], data["name"]), data)); - } catch(std::invalid_argument& e) { - // Fall back on the data passed in + } catch(std::exception& e) { + // Covers errors in building the creature or fs traversal. + // Fall back on the data passed in. return std::shared_ptr(new D(data, data)); } } @@ -57,4 +58,6 @@ namespace utils { std::vector> copper2coins(int coppers); std::string getCostString(int coppers); + + std::string toOrdinal(std::size_t number); } -- cgit v1.2.3