Warnings no longer throw exceptions

Former-commit-id: 49545105cb8d5a56e493b5eb63ed745aeb02d2f6
This commit is contained in:
Lynix 2013-12-07 23:47:07 +01:00
parent 43df67d47b
commit f7990e4521
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}