Skip to content

Commit 56b92eb

Browse files
committed
add the highs status string to the exception thrown if simplex fails
1 parent 16105cb commit 56b92eb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/simplex.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ void SimplexDecoder::decode_to_errors(const std::vector<uint64_t>& detections) {
265265
if (model_status != HighsModelStatus::kOptimal) {
266266
std::cerr << "Error: Model did not reach an optimal solution. Status: "
267267
<< highs->modelStatusToString(model_status) << std::endl;
268-
throw std::runtime_error("HighsModelStatus::kOptimal expected.");
268+
throw std::runtime_error("HighsModelStatus::kOptimal expected, got " +
269+
highs->modelStatusToString(model_status) + ".");
269270
}
270271

271272
// Extract the used errors

0 commit comments

Comments
 (0)