-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ER: parsing of try ... catch ...
#1608
Comments
I've been annoyed by this too. I think an |
I'm partial to obsoleting |
We can't really fix the issues with try-catch syntax, but we can introduce `try` as a function-like syntax, using `try(exp; handler)` in preference to `(try exp catch (handler))`. While we're at it, we can use the new `UNWINDING` opcode to implement try-catch-finally as `try(exp; handler; finally)`.
I've got a commit cbe4b81 that introduces As for |
We can't really fix the issues with try-catch syntax, but we can introduce `try` as a function-like syntax, using `try(exp; handler)` in preference to `(try exp catch (handler))`. While we're at it, we can use the new `UNWINDING` opcode to implement try-catch-finally as `try(exp; handler; finally)`.
We can't really fix the issues with try-catch syntax, but we can introduce `try` as a function-like syntax, using `try(exp; handler)` in preference to `(try exp catch (handler))`. While we're at it, we can use the new `UNWINDING` opcode to implement try-catch-finally as `try(exp; handler; finally)`.
We can't really fix the issues with try-catch syntax, but we can introduce `try` as a function-like syntax, using `try(exp; handler)` in preference to `(try exp catch (handler))`. While we're at it, we can use the new `UNWINDING` opcode to implement try-catch-finally as `try(exp; handler; finally)`.
Some users are surprised by the failure of expressions such as:
Here, parentheses are required around the "TRY" clause. That's a bit surprising since jq is so good about using keywords in the case of
if ... then ... else ... end
, and perhaps also because|=
is just a binary operator.The text was updated successfully, but these errors were encountered: