From f7990e4521ef4f35dc8e7e112701468aee8ad3d4 Mon Sep 17 00:00:00 2001 From: Lynix Date: Sat, 7 Dec 2013 23:47:07 +0100 Subject: [PATCH] Warnings no longer throw exceptions Former-commit-id: 49545105cb8d5a56e493b5eb63ed745aeb02d2f6 --- src/Nazara/Core/Error.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Nazara/Core/Error.cpp b/src/Nazara/Core/Error.cpp index 82ecd417f..6afc20426 100644 --- a/src/Nazara/Core/Error.cpp +++ b/src/Nazara/Core/Error.cpp @@ -30,7 +30,7 @@ void NzError::Error(nzErrorType type, const NzString& error) std::exit(EXIT_FAILURE); #endif - if ((s_flags & nzErrorFlag_ThrowException) != 0 && (s_flags & nzErrorFlag_ThrowExceptionDisabled) == 0) + if (type != nzErrorType_Warning && (s_flags & nzErrorFlag_ThrowException) != 0 && (s_flags & nzErrorFlag_ThrowExceptionDisabled) == 0) throw std::runtime_error(error); } @@ -49,7 +49,7 @@ void NzError::Error(nzErrorType type, const NzString& error, unsigned int line, std::exit(EXIT_FAILURE); #endif - if ((s_flags & nzErrorFlag_ThrowException) != 0 && (s_flags & nzErrorFlag_ThrowExceptionDisabled) == 0) + if (type != nzErrorType_Warning && (s_flags & nzErrorFlag_ThrowException) != 0 && (s_flags & nzErrorFlag_ThrowExceptionDisabled) == 0) throw std::runtime_error(error); }