-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error handling #4
Comments
You see I'm considering writing a Swift wrapper and this seems to be my biggest concern so far. |
the assert() means never raise error, if assert() occurs, it's the coding bug and not a programming runtime error. any assertion failure should not occurs in production scene. I have added auto test and coverage test, it's not 100%, that's the way I will work. for now in coverage amoeba should never crash on any input data. |
Great! |
Overconstraining a variable fails with
Example code
It seems better if it instead
|
I will test it. |
to add a new constraint, we have several ways to try (via Cassowary algorithm):
if we cannot find a subject and all terms are dummy variable, and constant is not zero (means some constraint like then, if we can not add it with a artificial variable, the constraint may unbound. but, all other implements just throw errors in all these situations, I just try to restore the state of solver and return the proper error code. So I must remove the added constraint if needed, I need may test case on adding, because all other implement not do this. If I'm not real add the constraint into solver and I try to remove it, this assertion failure will trigger, this is the source of this failure. I will improve it, but I need more test case to fix every the one case. |
Music to my ears!
Fantastic!
I can create more test cases. The Your library is very easy to use. Your style of writing c code is very clean. I'm very impressed with your skills! |
Very very thank you for your support :-) |
I have fixed this assertion failure, you could try the latest version. |
Perfect! |
I see quite a few asserts here and there in the code. Does that mean that if for example the solver is overconstrained the program will crash and exit? Or if I try to remove a constraint which hasn't been added it will crash and exit?
The text was updated successfully, but these errors were encountered: