Title: v7.0.0-rc.1 regression - error on error formatting with strict mode and $ErrorView = 'NormalView' · Issue #11371 · PowerShell/PowerShell · GitHub
Open Graph Title: v7.0.0-rc.1 regression - error on error formatting with strict mode and $ErrorView = 'NormalView' · Issue #11371 · PowerShell/PowerShell
X Title: v7.0.0-rc.1 regression - error on error formatting with strict mode and $ErrorView = 'NormalView' · Issue #11371 · PowerShell/PowerShell
Description: (UPDATE: I keep the original post but the problem is easier to reproduce, see further comments) v7.0.0-rc.1 regression - error on error formatting with strict mode and default host Steps to reproduce # v6-rc: fixed # v7.0.0-rc.1: fails "...
Open Graph Description: (UPDATE: I keep the original post but the problem is easier to reproduce, see further comments) v7.0.0-rc.1 regression - error on error formatting with strict mode and default host Steps to reprodu...
X Description: (UPDATE: I keep the original post but the problem is easier to reproduce, see further comments) v7.0.0-rc.1 regression - error on error formatting with strict mode and default host Steps to reprodu...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/11371
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"v7.0.0-rc.1 regression - error on error formatting with strict mode and $ErrorView = 'NormalView'","articleBody":"(UPDATE: I keep the original post but the problem is easier to reproduce, see further comments)\r\n\r\nv7.0.0-rc.1 regression - error on error formatting with strict mode and default host\r\n\r\n# Steps to reproduce\r\n\r\n```powershell\r\n# v6-rc: fixed\r\n# v7.0.0-rc.1: fails \"The property 'ErrorCategory_Message' cannot be found on this object.\"\r\n\r\n[PowerShell]::Create().AddScript({\r\n $ErrorView = 'NormalView' #! v7\r\n Set-StrictMode -Version 2\r\n try {\r\n throw 'Oops!'\r\n }\r\n catch {\r\n 'Error {'\r\n $_ | Out-String\r\n '}'\r\n $Error[0]\r\n }\r\n}).Invoke()\r\n```\r\n\r\n# Expected behavior\r\n\r\nThe code above works and prints something like\r\n\r\n```\r\nError {\r\n Oops! ...\r\n}\r\nOops! ...\r\n```\r\n\r\n# Actual behavior\r\n\r\nFormatting of the error (`$_ | Out-String`) fails\r\n\r\n```\r\nError {\r\n\r\n\r\n}\r\n\r\nPropertyNotFoundException:\r\nLine |\r\n 231 | $errorCategoryMsg = $err.ErrorCategory_Message\r\n\r\n | ^ The property 'ErrorCategory_Message' cannot be found on this object. Verify that the property exists.\r\n```\r\n\r\nIn the above, `$err.ErrorCategory_Message` looks strange. Should it be `$err.ErrorCategory.Message` perhaps (`.` instead of `_`)?\r\n\r\n# Environment data\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```none\r\nName Value\r\n---- -----\r\nPSVersion 7.0.0-rc.1\r\nPSEdition Core\r\nGitCommitId 7.0.0-rc.1\r\nOS Microsoft Windows 10.0.17763\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n","author":{"url":"https://github.com/nightroman","@type":"Person","name":"nightroman"},"datePublished":"2019-12-17T06:06:10Z","url":"https://github.com/PowerShell/PowerShell/issues/11371"}
| 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:00f957a0-e28a-1314-767a-128b2a800bac |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 90B8:1C11C6:31A4C:4687C:6AFD5871 |
| html-safe-nonce | d26b8752d0f3958edcb5ee54d8d9fabcab442fd1ffa2249c6aff49f7202245c8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MEI4OjFDMTFDNjozMUE0Qzo0Njg3Qzo2QUZENTg3MSIsInZpc2l0b3JfaWQiOiI3ODUyOTc5MDY5NzgyOTM5NzYxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | eb8d8ef978f173f4087752ce2ba44d5cd444ee5bed4b41d3029a9f0559a0259b |
| hovercard-subject-tag | issue:538858167 |
| 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/11371/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bbbaf82ecb3aeb12f4c2695344a1fb1b59c5bc4ccd1883be7fe34bb1238a9621/PowerShell/PowerShell/issues/11371 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bbbaf82ecb3aeb12f4c2695344a1fb1b59c5bc4ccd1883be7fe34bb1238a9621/PowerShell/PowerShell/issues/11371 |
| og:image:alt | (UPDATE: I keep the original post but the problem is easier to reproduce, see further comments) v7.0.0-rc.1 regression - error on error formatting with strict mode and default host Steps to reprodu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nightroman |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| 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 | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width