Skip to content

Commit 568e14b

Browse files
committed
MAINT: Cleanup and propagate correct exceptions
1 parent d21c4dc commit 568e14b

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/Highs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "lp_data/HighsRanging.h"
2323
#include "lp_data/HighsSolutionDebug.h"
2424
#include "model/HighsModel.h"
25+
#include "util/HighsExceptions.h"
2526
#include "presolve/ICrash.h"
2627
#include "presolve/PresolveComponent.h"
2728

src/presolve/HPresolve.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3918,10 +3918,8 @@ HPresolve::Result HPresolve::presolve(HighsPostsolveStack& postsolve_stack) {
39183918
try {
39193919
HPRESOLVE_CHECKED_CALL(initialRowAndColPresolve(postsolve_stack));
39203920
} catch (const DataStackOverflow& e) {
3921-
highsLogUser(options->log_options, HighsLogType::kInfo,
3922-
"Problem is too large to be presolved\n");
39233921
// Here we re-throw the error
3924-
throw;
3922+
throw PresolveTooLarge(e.what());
39253923
}
39263924

39273925
HighsInt numParallelRowColCalls = 0;

src/presolve/HighsPostsolveStack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ class HighsPostsolveStack {
380380
reductionAdded(ReductionType::kFixedCol);
381381
} catch (const DataStackOverflow& e) {
382382
std::cerr << "Memory allocation failed while processing fixedColAtLower: "
383-
<< e.what() << std::endl;
383+
<< std::endl;
384384
// Rethrow.
385385
throw;
386386
}

0 commit comments

Comments
 (0)