mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
bcde10242f
... and add a custom printer Since this is a very common bug, this patch should gain us a lot of time when debugging uncaught Not_found errors, because the element not found can now be printed straight away without the need for further debugging. The small cost is that one should remember to catch the correct specialised `Foo.Map.Not_found _` exception rather than the standard `Not_found` (which would type-check but not catch the exception). Using `find_opt` should be preferred anyway. Note that the other functions from the module `Map` that raise `Not_found` are not affected ; these functions are `choose`, `min/max_binding`, `find_first/last` which either take a predicate or fail on the empty map, so it wouldn't make sense for them (and we probably don't use them much). |
||
---|---|---|
.. | ||
ast.ml | ||
ast.mli | ||
dcalc.mld | ||
dune | ||
from_scopelang.ml | ||
from_scopelang.mli | ||
invariants.ml | ||
invariants.mli |