From 1fc1e9590a6323fef74a26fc50ba94d27ec51ce7 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Tue, 14 Oct 2014 12:52:11 +0200 Subject: [PATCH] throw an exception instead of false asserts --- Util/simple_logger.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Util/simple_logger.cpp b/Util/simple_logger.cpp index c484c7ed4..befff926f 100644 --- a/Util/simple_logger.cpp +++ b/Util/simple_logger.cpp @@ -27,6 +27,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "simple_logger.hpp" +#include "OSRMException.h" + #include #include @@ -97,7 +99,7 @@ std::ostringstream &SimpleLogger::Write(LogLevel l) #endif break; default: - BOOST_ASSERT_MSG(false, "should not happen"); + throw OSRMException("unkown logging state"); break; } os << "] "; @@ -130,7 +132,7 @@ SimpleLogger::~SimpleLogger() #endif break; default: - BOOST_ASSERT_MSG(false, "should not happen"); + throw OSRMException("unkown logging state"); break; } }