Skip to content
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

$error not described #4023

Closed
CoolDadTx opened this issue Mar 20, 2019 — with docs.microsoft.com · 3 comments
Closed

$error not described #4023

CoolDadTx opened this issue Mar 20, 2019 — with docs.microsoft.com · 3 comments
Assignees
Labels
area-language Area - PowerShell syntax and keywords

Comments

Copy link

There is no information in this article on how to get access to the error information inside a catch block. It mentions that the $error variable is set before searching for the catch handler. It then recommends that you read the section called about_errors. This section doesn't exist in the TOC nor is it linked in the See Also section.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@sdwheeler sdwheeler added Reference area-language Area - PowerShell syntax and keywords labels Mar 21, 2019
@SteveL-MSFT
Copy link
Contributor

The $error variable is just a running "log" of all errors. The text should mention using $_ or $PSItem to access the caught error with some samples.

Copy link
Contributor

jcoutch commented Apr 3, 2019

Just an FYI - If you look in the top right corner, there's an "Edit" button which takes you to the GitHub repo containing this documentation so that you can submit pull requests. I just submitted one to address this:
#4107

@bobbytreed bobbytreed self-assigned this Apr 17, 2019
@sdwheeler
Copy link
Contributor

Looks like this was fixed in #4107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Area - PowerShell syntax and keywords
Projects
None yet
Development

No branches or pull requests

5 participants