From 09bd0324c92b7c6125e291d1bbaf6cba601db2e3 Mon Sep 17 00:00:00 2001 From: Emanuel Guevel Date: Tue, 8 Apr 2014 20:19:09 +0200 Subject: [PATCH] Fail properly when a content file is not found --- apps/openmw/mwworld/worldimp.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 594a9f7f4..f808856c5 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2071,6 +2071,12 @@ namespace MWWorld { contentLoader.load(col.getPath(*it), idx); } + else + { + std::stringstream msg; + msg << "Failed loading " << *it << ": the content file does not exist"; + throw std::runtime_error(msg.str()); + } } }