Title: New error view stuff blows up when a non-ErrorRecord is in $error · Issue #11459 · PowerShell/PowerShell · GitHub
Open Graph Title: New error view stuff blows up when a non-ErrorRecord is in $error · Issue #11459 · PowerShell/PowerShell
X Title: New error view stuff blows up when a non-ErrorRecord is in $error · Issue #11459 · PowerShell/PowerShell
Description: And exceptions fail to display at all. Steps to reproduce Don't execute these in one single invocation; each line should be entered separately at the interactive prompt: if foo $error $error.Count $foo = $error[-1] $foo $error.Count Expe...
Open Graph Description: And exceptions fail to display at all. Steps to reproduce Don't execute these in one single invocation; each line should be entered separately at the interactive prompt: if foo $error $error.Count ...
X Description: And exceptions fail to display at all. Steps to reproduce Don't execute these in one single invocation; each line should be entered separately at the interactive prompt: if foo $error $error.Co...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/11459
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"New error view stuff blows up when a non-ErrorRecord is in $error","articleBody":"**And** exceptions fail to display at all.\r\n\r\n# Steps to reproduce\r\n\r\nDon't execute these in one single invocation; each line should be entered separately at the interactive prompt:\r\n```powershell\r\nif foo\r\n$error\r\n$error.Count\r\n$foo = $error[-1]\r\n$foo\r\n$error.Count\r\n```\r\n\r\n# Expected behavior\r\nThe first line should yield an error, because \"`if foo`\" is not valid syntax. And then when we execute \"`$error`\" we should see the contents of the `$error` variable, which should be that same error. And then `$error.Count` should yield \"1\". And then when we assign that error into `$foo`, and then output `$foo`, we should see the error again. And `$error.Count` should stay 1.\r\n\r\n# Actual behavior\r\nWhen `$error` is output, we get \r\n\r\n```none\r\nInvalidOperation: An error occurred while enumerating through a collection: Collection was modified; enumeration operation may not execute..\r\n```\r\nAnd `$error.Count` is 4, not 1.\r\n\r\nAnd then when we output `$foo`, get get... nothing. (well, a blank line)\r\n\r\nAnd then $error.Count is 6.\r\n\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.18363\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/jazzdelightsme","@type":"Person","name":"jazzdelightsme"},"datePublished":"2019-12-30T22:10:33Z","url":"https://github.com/PowerShell/PowerShell/issues/11459"}
| 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:e6fd940a-fed0-9711-9e44-4ec46ad825ed |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B32A:3B38CF:27EF16E:37BC681:6AFD4E6F |
| html-safe-nonce | ee811194da28554a3eab7e3b22b5c5db210b9b61e41f77615d1414c23e91307d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMzJBOjNCMzhDRjoyN0VGMTZFOjM3QkM2ODE6NkFGRDRFNkYiLCJ2aXNpdG9yX2lkIjoiNzMyNDcwNDIyNTU4ODIzNTg4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4e3437db4d3a3b0f6b1f5358201d01b873930a6d209dc6766952ea0501806276 |
| hovercard-subject-tag | issue:544026184 |
| 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/11459/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cb56d7c44416f48c5746047fd106a2b9c4c61bc0737c48559fb924672eba7178/PowerShell/PowerShell/issues/11459 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cb56d7c44416f48c5746047fd106a2b9c4c61bc0737c48559fb924672eba7178/PowerShell/PowerShell/issues/11459 |
| og:image:alt | And exceptions fail to display at all. Steps to reproduce Don't execute these in one single invocation; each line should be entered separately at the interactive prompt: if foo $error $error.Count ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jazzdelightsme |
| 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