Skip to content

Wrapped the calls to Highs::calledOptimizeModel(), simplex, callSolveQp and MIP solver in try-catch blocks#3168

Open
jajhall wants to merge 2 commits into
latestfrom
fix-2924+3150
Open

Wrapped the calls to Highs::calledOptimizeModel(), simplex, callSolveQp and MIP solver in try-catch blocks#3168
jajhall wants to merge 2 commits into
latestfrom
fix-2924+3150

Conversation

@jajhall

@jajhall jajhall commented Jul 26, 2026

Copy link
Copy Markdown
Member

Closes #2924 and #3150

Although the Highs::calledOptimizeModel() try-catch block is sufficient, the lower level try-catch blocks enable the particular solver causing the exception to be identified.

@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 25.00000% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.16%. Comparing base (d2b07df) to head (883c224).
⚠️ Report is 180 commits behind head on latest.

Files with missing lines Patch % Lines
highs/lp_data/Highs.cpp 31.81% 15 Missing ⚠️
highs/lp_data/HighsSolve.cpp 10.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           latest    #3168     +/-   ##
=========================================
  Coverage   73.16%   73.16%             
=========================================
  Files         430      432      +2     
  Lines      103967   105487   +1520     
  Branches    16718    16984    +266     
=========================================
+ Hits        76069    77183   +1114     
- Misses      27622    28028    +406     
  Partials      276      276             

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@filikat

filikat commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Looks good! However, if there is an exception thrown by the parallel scheduler (there shouldn't be, I hope I fixed all the bugs, but who knows), this will not be caught here, because it does not inherit from std::exception. To catch it, we would need a specific catch block with catch (const HighsTask::Interrupt&), or just catch(...), but then we cannot know what exception it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants