mosek_guarded.cpp 426 B

1234567891011121314151617
  1. #include "mosek_guarded.h"
  2. #include <iostream>
  3. IGL_INLINE MSKrescodee igl::mosek_guarded(const MSKrescodee r)
  4. {
  5. using namespace std;
  6. if(r != MSK_RES_OK)
  7. {
  8. /* In case of an error print error code and description. */
  9. char symname[MSK_MAX_STR_LEN];
  10. char desc[MSK_MAX_STR_LEN];
  11. MSK_getcodedesc(r,symname,desc);
  12. cerr<<"MOSEK ERROR ("<<r<<"): "<<symname<<" - '"<<desc<<"'"<<endl;
  13. }
  14. return r;
  15. }