shingarov / MachineArithmetic

A mathematical foundation for Smalltalk-25
MIT License
17 stars 6 forks source link

Clear error in `#errorCheck` #371

Closed janvrany closed 3 weeks ago

janvrany commented 3 weeks ago

Some Z3 APIs don't clear error (like some dec_refs and possibly others), so it could happen that, after encounting error (and reporting it) we call another Z3 functions which does not clear it and subsequent #errorCheck would report an error again (see #348).

An obvious solution - not to call #errorCheck for those API - is bit fragile - Z3 API is not explicit about which do and which don't and this is known to change version to version.

So instead, we took the approach of clearing the error - this way each (detected) error is reported only once.