adobe / json-formula

Query language for JSON documents
http://opensource.adobe.com/json-formula/
Apache License 2.0
19 stars 8 forks source link

Error type in mod #154

Closed Eswcvlad closed 4 months ago

Eswcvlad commented 5 months ago

Currently mod throws FunctionError, if divisor is 0.

Maybe it would be better to throw an EvaluationError instead? This is what currently happens in other math functions (power, log, log10, sqrt, ...) and would be consistent with division outside of functions as well.


Don't think I have anything left to report. I have some type coercion stuff with sum types left, but I am not sure it makes sense to bring them up after #146.

JohnBrinkman commented 4 months ago

agreed