Improved dai::Exception object (it now stores more information and doesn't print...
[libdai.git] / examples / example.cpp
index cada3e5..b76c3aa 100644 (file)
@@ -53,7 +53,7 @@ int main( int argc, char *argv[] ) {
         try {
             boundTreewidth(fg, &eliminationCost_MinFill, maxstates );
         } catch( Exception &e ) {
-            if( e.code() == Exception::OUT_OF_MEMORY ) {
+            if( e.getCode() == Exception::OUT_OF_MEMORY ) {
                 do_jt = false;
                 cout << "Skipping junction tree (need more than " << maxstates << " states)." << endl;
             }