Title: Get-Error: Avoid duplicate information contained in nested ErrorRecord blocks · Issue #11123 · PowerShell/PowerShell · GitHub
Open Graph Title: Get-Error: Avoid duplicate information contained in nested ErrorRecord blocks · Issue #11123 · PowerShell/PowerShell
X Title: Get-Error: Avoid duplicate information contained in nested ErrorRecord blocks · Issue #11123 · PowerShell/PowerShell
Description: Summary of the new feature/enhancement Update: The issue is primarily that a nested ErrorRecord: prints duplicate information, which results in "noisy" output that is hard to parse; see the discussion in the comments. Currently, when Get...
Open Graph Description: Summary of the new feature/enhancement Update: The issue is primarily that a nested ErrorRecord: prints duplicate information, which results in "noisy" output that is hard to parse; see the discuss...
X Description: Summary of the new feature/enhancement Update: The issue is primarily that a nested ErrorRecord: prints duplicate information, which results in "noisy" output that is hard to parse; see t...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/11123
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Get-Error: Avoid duplicate information contained in nested ErrorRecord blocks","articleBody":"# Summary of the new feature/enhancement\r\n\r\n_Update_: The issue is primarily that a nested `ErrorRecord:` prints duplicate information, which results in \"noisy\" output that is hard to parse; see the discussion in the comments.\r\n\r\n----\r\n\r\nCurrently, when `Get-Error` pretty-prints an error, the information about the error record's `.Exception` and `Exception.InnerException` values are pretty far apart.\r\n\r\nIt would be helpful if they were grouped together in the output.\r\n\r\nCurrently (look for `\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c` markers; note that in this simple example the messages happen to be the same, but that's not typical):\r\n\r\n```powershell\r\nException :\r\n ErrorRecord :\r\n Exception : \u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\r\n Message : Attempted to divide by zero.\r\n HResult : -2146233087\r\n CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException\r\n FullyQualifiedErrorId : RuntimeException\r\n InvocationInfo :\r\n ScriptLineNumber : 1\r\n OffsetInLine : 1\r\n HistoryId : -1\r\n Line : 1/0\r\n PositionMessage : At line:1 char:1\r\n + 1/0\r\n + ~~~\r\n CommandOrigin : Internal\r\n ScriptStackTrace : at \u003cScriptBlock>, \u003cNo file>: line 1\r\n TargetSite :\r\n Name : Divide\r\n DeclaringType : System.Management.Automation.IntOps\r\n MemberType : Method\r\n Module : System.Management.Automation.dll\r\n StackTrace :\r\n at System.Management.Automation.IntOps.Divide(Int32 lhs, Int32 rhs)\r\n at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)\r\n at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)\r\n at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)\r\n Message : Attempted to divide by zero.\r\n Data : System.Collections.ListDictionaryInternal\r\n InnerException : \u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\r\n Message : Attempted to divide by zero.\r\n HResult : -2147352558\r\n\r\n```\r\n\r\nDesired:\r\n\r\n```powershell\r\nException :\r\n ErrorRecord :\r\n Exception : \u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\r\n Message : Attempted to divide by zero.\r\n HResult : -2146233087\r\n InnerException : \u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\r\n Message : Attempted to divide by zero.\r\n HResult : -2147352558\r\n CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException\r\n FullyQualifiedErrorId : RuntimeException\r\n InvocationInfo :\r\n ScriptLineNumber : 1\r\n OffsetInLine : 1\r\n HistoryId : -1\r\n Line : 1/0\r\n PositionMessage : At line:1 char:1\r\n + 1/0\r\n + ~~~\r\n CommandOrigin : Internal\r\n ScriptStackTrace : at \u003cScriptBlock>, \u003cNo file>: line 1\r\n TargetSite :\r\n Name : Divide\r\n DeclaringType : System.Management.Automation.IntOps\r\n MemberType : Method\r\n Module : System.Management.Automation.dll\r\n StackTrace :\r\n at System.Management.Automation.IntOps.Divide(Int32 lhs, Int32 rhs)\r\n at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)\r\n at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)\r\n at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)\r\n Message : Attempted to divide by zero.\r\n Data : System.Collections.ListDictionaryInternal\r\n```\r\n\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2019-11-19T18:52:29Z","url":"https://github.com/PowerShell/PowerShell/issues/11123"}
| 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:7ff27bbd-01cf-d006-ed51-9f5dbf0c9a3b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C184:319C94:1F4CF5:2A7192:6AFD44D8 |
| html-safe-nonce | 4c0747abb5044afb005e91de89864d5bf7792420833741ada6bfde04ce72ba06 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTg0OjMxOUM5NDoxRjRDRjU6MkE3MTkyOjZBRkQ0NEQ4IiwidmlzaXRvcl9pZCI6IjE2NjQyMDgwMjgzNjM5OTg0MjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ae5bbe0fa9e18cc873dfa80997ccb9a4b89f0f5fea5711f41d42ea4e76da64c0 |
| hovercard-subject-tag | issue:525197304 |
| 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/11123/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7b9278a80a989a8ff07485b1af0290f9f7bde30ebce731284094094131ca5deb/PowerShell/PowerShell/issues/11123 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7b9278a80a989a8ff07485b1af0290f9f7bde30ebce731284094094131ca5deb/PowerShell/PowerShell/issues/11123 |
| og:image:alt | Summary of the new feature/enhancement Update: The issue is primarily that a nested ErrorRecord: prints duplicate information, which results in "noisy" output that is hard to parse; see the discuss... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mklement0 |
| 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