-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
test and document var x = $(false) #942
Comments
Yeah
I think it should exit with the last one/?
|
Addresses issue #942 Unrelated: notes on how to create an empty shell VM for config file evaluation
Idea: what happens when
This is invalid syntax!
|
Another syntactic issue with error handling: Checking the return value of procs that take blocks I think you have to use
|
This is part of #477 , but it's worth having our own issue |
Note on the design problem
TODO: also fix |
Crazy idea:
Except this means that
hm this is weird, I think it runs into a parsing issue |
Maybe, some kind of RHS assignment operator
Or simply use
Doesn't work with |
Hm this is not horrible ... It's long but we want to discourage this style I think ... functions should mostly be "pure". However it may be a challenge to people who want to import Python/JS knowledge ...
This really isn't any different than
|
https://oilshell.zulipchat.com/#narrow/stream/121540-oil-discuss/topic/errexit.20issue.20and.20docs I suggest
Not sure how common it will be ? |
So then errexit can take over. This fixes uncaught IndexError, KeyError, ZeroDivisionError, etc. We still don't have a good story for TypeError. There is a one-off around one EvalExpr. Addresses #942.
I defined expression errors to be status 3.
|
In other words, this is FATAL even in bin/osh. var x = $(false) You must use the 'try' builtin to recover from it. The 'var' keyword is a new construct that doesn't require compatibility, so we it should have the right behavior in bin/osh. This finishes #942.
command_sub_errexit
so it fails early?The text was updated successfully, but these errors were encountered: