Skip to content

Rethrow for bounds error when modifying constant vector#2976

Merged
blegat merged 3 commits intomasterfrom
bl/modify_constant
Mar 20, 2026
Merged

Rethrow for bounds error when modifying constant vector#2976
blegat merged 3 commits intomasterfrom
bl/modify_constant

Conversation

@blegat
Copy link
Member

@blegat blegat commented Mar 19, 2026

Not a fan of the try-catch, I would have preferred an approach like #2975 but it would be breaking

@odow
Copy link
Member

odow commented Mar 19, 2026

We could implement the other approach and then run solver-tests? Arguably ignoring BoundsError like this is a bug.

@odow odow force-pushed the bl/modify_constant branch from 45603fe to 1c49e73 Compare March 20, 2026 01:22
@odow
Copy link
Member

odow commented Mar 20, 2026

@odow
Copy link
Member

odow commented Mar 20, 2026

@blegat how's this?

@blegat
Copy link
Member Author

blegat commented Mar 20, 2026

Good idea. Actually, we could return missing or return MOI.ModifyConstraintNotAllowed to avoid defining a new type, but it's maybe a bit hacky. Since the struct we define is internal, what we return is purely inside MOI anyway.

@blegat blegat merged commit 15b62ad into master Mar 20, 2026
30 checks passed
@blegat blegat deleted the bl/modify_constant branch March 20, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants