[mlpack-git] master: Make Assert() throw an exception too. (aaa19c9)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Wed Apr 8 14:57:57 EDT 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/6dd7d3e90151026d6da3c9178b009ea1a10c91d5...aaa19c9dcaed6e859d6565b8c1bfb07f755f0d7e
>---------------------------------------------------------------
commit aaa19c9dcaed6e859d6565b8c1bfb07f755f0d7e
Author: ryan <ryan at ratml.org>
Date: Wed Apr 8 14:57:47 2015 -0400
Make Assert() throw an exception too.
>---------------------------------------------------------------
aaa19c9dcaed6e859d6565b8c1bfb07f755f0d7e
src/mlpack/core/util/log.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mlpack/core/util/log.cpp b/src/mlpack/core/util/log.cpp
index c532a55..2ff9cf8 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
More information about the mlpack-git
mailing list