coverity#1202902 Uncaught CoinError exception
Change-Id: I93488fa942f1975b9c32be6d37fc76ea955a2067
This commit is contained in:
@@ -2217,6 +2217,7 @@ $(call gb_LinkTarget_add_libs,$(1),\
|
||||
endif
|
||||
$(call gb_LinkTarget_set_include,$(1),\
|
||||
-I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
|
||||
-I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
|
||||
$$(INCLUDE) \
|
||||
)
|
||||
|
||||
|
1
external/coinmp/UnpackedTarball_coinmp.mk
vendored
1
external/coinmp/UnpackedTarball_coinmp.mk
vendored
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,coinmp,\
|
||||
external/coinmp/android.build.patch.1 \
|
||||
external/coinmp/no-binaries.patch.1 \
|
||||
external/coinmp/werror-format-security.patch.0 \
|
||||
external/coinmp/werror-undef.patch.0 \
|
||||
external/coinmp/windows.build.patch.1 \
|
||||
))
|
||||
|
||||
|
11
external/coinmp/werror-undef.patch.0
vendored
Normal file
11
external/coinmp/werror-undef.patch.0
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
--- CoinUtils/src/config_coinutils_default.h 2014-06-06 14:28:06.872113540 +0100
|
||||
+++ CoinUtils/src/config_coinutils_default.h 2014-06-06 14:28:29.400294129 +0100
|
||||
@@ -26,7 +26,7 @@
|
||||
all of this inside the guard for MSC_VER >= 1200. If you're reading this
|
||||
and have been developing in MSVS long enough to know, fix it. -- lh, 100915 --
|
||||
*/
|
||||
-#if _MSC_VER >= 1200
|
||||
+#if defined _MSC_VER && _MSC_VER >= 1200
|
||||
# include <BaseTsd.h>
|
||||
# define COIN_INT64_T INT64
|
||||
# define COIN_UINT64_T UINT64
|
@@ -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 )
|
||||
|
Reference in New Issue
Block a user