summaryrefslogtreecommitdiff
path: root/ext/tryfunc/README.md
AgeCommit message (Collapse)Author
2019-12-17ext/tryfunc: Extension functions for error handlingMartin Atkins
The try(...) and can(...) functions are intended to make it more convenient to work with deep data structures of unknown shape, by allowing a caller to concisely try a complex traversal operation against a value without having to guard against each possible failure mode individually. These rely on the customdecode extension to get access to their argument expressions directly, rather than only the results of evaluating those expressions. The expressions can then be evaluated in a controlled manner so that any resulting errors can be recognized and suppressed as appropriate.