diff --git a/src/mlpack/core/util/log.cpp b/src/mlpack/core/util/log.cpp index c532a557c2..2ff9cf84ad 100644 --- a/src/mlpack/core/util/log.cpp +++ b/src/mlpack/core/util/log.cpp @@ -125,7 +125,7 @@ void Log::Assert(bool condition, const std::string& message) free(messages); #endif - exit(1); + throw std::runtime_error("Log::Assert() failed:" + message); } } #else