Changeset 2189 for trunk/Bonmin


Ignore:
Timestamp:
Jun 19, 2017 5:05:44 AM (2 years ago)
Author:
stefan
Message:

better call RethrowNonIpoptException? immediately after IpoptApplication? is constructed, in case Initialize is not called (e.g., after clone())

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Bonmin/src/Interfaces/Ipopt/BonIpoptSolver.cpp

    r2181 r2189  
    3434    if (createEmpty) return;
    3535    app_ = new Ipopt::IpoptApplication(GetRawPtr(roptions_), options_, journalist_);
     36#ifdef NO_CATCH_ALL
     37    app_->RethrowNonIpoptException(true);
     38#endif
    3639  }
    3740
     
    4952    roptions_ = roptions;
    5053    app_ = new Ipopt::IpoptApplication(GetRawPtr(roptions), options, journalist);
     54#ifdef NO_CATCH_ALL
     55    app_->RethrowNonIpoptException(true);
     56#endif
    5157  }
    5258
     
    6369    roptions_ = roptions;
    6470    app_ = new Ipopt::IpoptApplication(GetRawPtr(roptions), options, journalist);
     71#ifdef NO_CATCH_ALL
     72    app_->RethrowNonIpoptException(true);
     73#endif
    6574  }
    6675
     
    7685    optimized_before_(false){
    7786      app_ = new Ipopt::IpoptApplication(GetRawPtr(roptions_), options_, journalist_);
     87#ifdef NO_CATCH_ALL
     88      app_->RethrowNonIpoptException(true);
     89#endif
    7890  }
    7991
     
    92104  IpoptSolver::Initialize(std::string params_file)
    93105  {
    94 #ifdef NO_CATCH_ALL
    95     app_->RethrowNonIpoptException(true);
    96 #endif
    97106    Ipopt::ApplicationReturnStatus status =
    98107      app_->Initialize(params_file);
     
    109118  IpoptSolver::Initialize(std::istream &is)
    110119  {
    111 #ifdef NO_CATCH_ALL
    112     app_->RethrowNonIpoptException(true);
    113 #endif
    114120    Ipopt::ApplicationReturnStatus status =
    115121      app_->Initialize(is);
Note: See TracChangeset for help on using the changeset viewer.