From afa71bb622df10872c2d997731c30b409b4cb374 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 5 Dec 2013 14:23:39 +0100 Subject: [PATCH] Throw an exception if a BSA is not found --- apps/openmw/engine.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index a729bdda1..02e7a5955 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -1,6 +1,6 @@ #include "engine.hpp" -#include "components/esm/loadcell.hpp" +#include #include #include @@ -18,6 +18,8 @@ #include #include +#include + #include "mwinput/inputmanagerimp.hpp" #include "mwgui/windowmanagerimp.hpp" @@ -211,7 +213,9 @@ void OMW::Engine::loadBSA() } else { - std::cout << "Archive " << *archive << " not found" << std::endl; + std::stringstream message; + message << "Archive '" << *archive << "' not found"; + throw std::runtime_error(message.str()); } } }