-
Notifications
You must be signed in to change notification settings - Fork 478
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
Add a chapter about errors #772
Comments
I think this would be a great add. You may want to mention |
Good point, added it to a list of topics to cover
Not sure what you mean there, at the moment, Regarding exceptions. |
There used to be a difference between these two commands (not in a directory with a git repo). Now there doesn't appear to be.
and
and with capturing the output.
and
|
@fdncred I can see the following difference # test1.nu
do { git branch --show-current }
echo Hello
# test2.nu
do -i { git branch --show-current }
echo Hello
|
That's great that you've found a difference. Whatever all the differences are in those |
One concept that I still find quite hard to grasp are Nushell's errors.
As far as I can tell, they behave like raised exceptions in a language like Python.
They bubble up, but can be caught with
try
ordo -i
.However, I haven't seen that spelled out yet.
I see that nushell errors are also created if external commands exit with a non-zero exit code.
But also that isn't mentioned in the book.
I would be happy to add a chapter about errors in Nushell if someone could me guide through the things I am unsure about.
Topics to cover:
try
do
error make
complete
The text was updated successfully, but these errors were encountered: