Source

BayesOpt / src / gaussian_process_normal.cpp

Diff from to

src/gaussian_process_normal.cpp

 ------------------------------------------------------------------------
 */
 
+#include <cstdlib>
 #include <boost/math/special_functions/fpclassify.hpp>
 #include <boost/numeric/ublas/banded.hpp>
 #include "log.hpp"
     if ((boost::math::isnan(yPred)) || (boost::math::isnan(sPred)))
       {
 	FILE_LOG(logERROR) << "Error in prediction. NaN found.";
-	throw 1;
+	exit(EXIT_FAILURE);
       }
 					
 
     if (boost::math::isnan(mWMap(0)))
       {
 	FILE_LOG(logERROR) << "Error in precomputed prediction. NaN found.";
-	throw 1;
+	return -1;
       }
     return 0;
   }