Changeset 2244


Ignore:
Timestamp:
Jan 29, 2020 5:26:20 AM (16 months ago)
Author:
stefan
Message:

declare exception classes with BONMINLIB_EXPORT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/autotools-update/Bonmin/src/Interfaces/BonTMINLP.hpp

    r2242 r2244  
    2626#include "CoinHelperFunctions.hpp"
    2727
     28#define DECLARE_STD_BONMIN_EXCEPTION(__except_type) \
     29    class BONMINLIB_EXPORT  __except_type : public Ipopt::IpoptException \
     30    { \
     31    public: \
     32      __except_type(std::string msg, std::string fname, Ipopt::Index line) \
     33      : Ipopt::IpoptException(msg,fname,line, #__except_type) {} \
     34      __except_type(const __except_type& copy) \
     35      : Ipopt::IpoptException(copy) {} \
     36    private: \
     37       __except_type(); \
     38       void operator=(const __except_type&); \
     39    }
     40
    2841namespace Bonmin
    2942{
    30   DECLARE_STD_EXCEPTION(TMINLP_INVALID);
    31   DECLARE_STD_EXCEPTION(TMINLP_INVALID_VARIABLE_BOUNDS);
     43  DECLARE_STD_BONMIN_EXCEPTION(TMINLP_INVALID);
     44  DECLARE_STD_BONMIN_EXCEPTION(TMINLP_INVALID_VARIABLE_BOUNDS);
    3245
    3346  /** Base class for all MINLPs that use a standard triplet matrix form
Note: See TracChangeset for help on using the changeset viewer.