Title: PS7: Get-Error should report the fully-qualified error name · Issue #11106 · PowerShell/PowerShell · GitHub
Open Graph Title: PS7: Get-Error should report the fully-qualified error name · Issue #11106 · PowerShell/PowerShell
X Title: PS7: Get-Error should report the fully-qualified error name · Issue #11106 · PowerShell/PowerShell
Description: Summary of the new feature/enhancement Get-Error reports fullyqualifiederrorid without its namespace. This can make it difficult to find the fully qualified exception for use in catch statements, especially if running in Azure Functions ...
Open Graph Description: Summary of the new feature/enhancement Get-Error reports fullyqualifiederrorid without its namespace. This can make it difficult to find the fully qualified exception for use in catch statements, e...
X Description: Summary of the new feature/enhancement Get-Error reports fullyqualifiederrorid without its namespace. This can make it difficult to find the fully qualified exception for use in catch statements, e...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/11106
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PS7: Get-Error should report the fully-qualified error name","articleBody":"# Summary of the new feature/enhancement\r\n\r\n\u003c!-- \r\nA clear and concise description of what the problem is that the new feature would solve.\r\nTry formulating it in user story style (if applicable):\r\n'As a user I want X so that Y.' with X being the being the action and Y being the value of the action.\r\n-->\r\nGet-Error reports fullyqualifiederrorid without its namespace. This can make it difficult to find the fully qualified exception for use in catch statements, especially if running in Azure Functions or other environments with custom exceptions and you only have text logs to go off of. Since the major point of Get-Error is to address exceptions and perhaps catch them, the fully qualified type is important to do a specific catch, as my most common workflow when looking at errors is doing `$error[0].exception.gettype().fullname` as the very next step so I know what to use in a try/catch.\r\n\r\n# Proposed technical implementation details (optional)\r\n\r\nAdd `FullyQualifiedErrorType` and `FullyQualifiedErrorParentType` properties that would display the full error type (what you would submit as a type to catch) as well as other error types that would catch this property, minus the obvious \"system.exception\" and \"system.object\" that all exceptions inherit from.\r\n\r\ne.g.\r\nFullyQualifiedErrorType:\r\n```powershell\r\n$error[0].exception.gettype()\r\n```\r\nFullyQualifiedErrorParentTypes:\r\n```powershell\r\n$currentType = $error[0].exception.getType()\r\nwhile ($CurrentType) {\r\n $currentType = $currentType.BaseType\r\n if ($currentType.fullname -eq 'System.Exception') {break}\r\n $currentType\r\n}\r\n```\r\n\r\n\u003c!-- \r\nA clear and concise description of what you want to happen.\r\nConsider providing an example PowerShell experience with expected result.\r\n-->\r\n","author":{"url":"https://github.com/JustinGrote","@type":"Person","name":"JustinGrote"},"datePublished":"2019-11-18T21:10:30Z","url":"https://github.com/PowerShell/PowerShell/issues/11106"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8abfdc45-be8b-482a-be26-43de2266d4af |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 880A:1B36E7:1FFE9A:2ACBBD:6AFD44DC |
| html-safe-nonce | 0ed4885a37f09e253c945f33c1da6f7859f21b08af2c6c9f5bfa5bcfe243aac0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODBBOjFCMzZFNzoxRkZFOUE6MkFDQkJEOjZBRkQ0NERDIiwidmlzaXRvcl9pZCI6IjIxNTI5MjU2NjExMjE4MjM5NjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d137f42fe4aade455216beb51366c5d7acb73788be781600caecaf5eecd8f0e8 |
| hovercard-subject-tag | issue:524621502 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/11106/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7b9278a80a989a8ff07485b1af0290f9f7bde30ebce731284094094131ca5deb/PowerShell/PowerShell/issues/11106 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7b9278a80a989a8ff07485b1af0290f9f7bde30ebce731284094094131ca5deb/PowerShell/PowerShell/issues/11106 |
| og:image:alt | Summary of the new feature/enhancement Get-Error reports fullyqualifiederrorid without its namespace. This can make it difficult to find the fully qualified exception for use in catch statements, e... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JustinGrote |
| hostname | github.com |
| expected-hostname | github.com |
| None | bdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 556dd37bb0aceffb25724e151b5d858b3265b40b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width