loco icon indicating copy to clipboard operation
loco copied to clipboard

Better error messages

Open setzer22 opened this issue 8 years ago • 3 comments

I find that while your library is really easy to use, the slightest error in the model generation results in an incomprehensible error message that arises from the inner implementation.

The one I'm seeing the most is:

No method in multimethod ->choco* for dispatch value: <whatever>

I think proper model validation and error messages would make a very nice addition to an otherwise awesome library!

setzer22 avatar Apr 26 '16 11:04 setzer22

Thanks, I definitely agree that's an issue with Loco at the moment. It'll require some thought to determine how to add enough validation to every constraint to prevent these types of errors.

aengelberg avatar Apr 26 '16 19:04 aengelberg

Hello Alex, any progress on this? thanks!

marco-m avatar Aug 12 '17 15:08 marco-m

I'm actually working on a possible solution to this, by putting pre conditions on the constraint functions, and I have loco produce something like pseudo code that can have validation functions run against it. at the very least one can look at the output and see if it makes sense.

boxxxie avatar Jan 03 '18 18:01 boxxxie