Cleaned up error handling by introducing the DAI_THROWE macro.
[libdai.git] / src / alldai.cpp
index 3c5fbba..1e8733f 100644 (file)
@@ -71,7 +71,7 @@ InfAlg *newInfAlg( const std::string &name, const FactorGraph &fg, const Propert
     if( name == CBP::Name )
         return new CBP (fg, opts);
 #endif
-    DAI_THROW(UNKNOWN_DAI_ALGORITHM);
+    DAI_THROWE(UNKNOWN_DAI_ALGORITHM,"Unknown libDAI algorithm: " + name);
 }