diff options
Diffstat (limited to 'sccomp')
-rw-r--r-- | sccomp/source/solver/CoinMPSolver.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sccomp/source/solver/CoinMPSolver.cxx b/sccomp/source/solver/CoinMPSolver.cxx index f1ee10b40b80..7a016b154220 100644 --- a/sccomp/source/solver/CoinMPSolver.cxx +++ b/sccomp/source/solver/CoinMPSolver.cxx @@ -18,6 +18,7 @@ */ #include <CoinMP.h> +#include <CoinError.hpp> #include "SolverComponent.hxx" #include "solver.hrc" @@ -313,7 +314,15 @@ void SAL_CALL CoinMPSolver::solve() throw(uno::RuntimeException, std::exception) // solve model nResult = CoinCheckProblem( hProb ); - nResult = CoinOptimizeProblem( hProb, 0 ); + + try + { + nResult = CoinOptimizeProblem( hProb, 0 ); + } + catch (const CoinError& e) + { + throw std::runtime_error(e.message()); + } mbSuccess = ( nResult == SOLV_CALL_SUCCESS ); if ( mbSuccess ) |