Allow user definition of functions that avoid parameter error checking · Issue #523 · google/cel-go · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allowing users to specify that this class of function in a limited way (only as global functions) would allow users to construct a form of error evasion/try evaluation on potentially failable expressions. This is important for expressions that have multiple parts where some can fail but an incompletely successful evaluation is still useful.
I considered the option of adding a language operator that allows a similar outcome, but it becomes a language feature that is likely to be abused and would be less flexible.
I'm happy to do the work to implement this.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Feature request checklist
Change
Allowing users to specify that this class of function in a limited way (only as global functions) would allow users to construct a form of error evasion/try evaluation on potentially failable expressions. This is important for expressions that have multiple parts where some can fail but an incompletely successful evaluation is still useful.
See https://groups.google.com/g/cel-go-discuss/c/YmQcarGB5V0/m/oS7qa1ppBgAJ for additional context.
Example
This would allow a user to define (bike-shed spelling) a "try" evaluation that lowers the significance of an error to a string message:
which in the case that the evaluations of
less_safe_expression
failed might give a final result like:or on success
Alternatives considered
I considered the option of adding a language operator that allows a similar outcome, but it becomes a language feature that is likely to be abused and would be less flexible.
I'm happy to do the work to implement this.
The text was updated successfully, but these errors were encountered: