Title: Add a property to [System.Management.Automation.ErrorRecord] to distinguish error types (non-terminating, statement-terminating, script-terminating) · Issue #4781 · PowerShell/PowerShell · GitHub
Open Graph Title: Add a property to [System.Management.Automation.ErrorRecord] to distinguish error types (non-terminating, statement-terminating, script-terminating) · Issue #4781 · PowerShell/PowerShell
X Title: Add a property to [System.Management.Automation.ErrorRecord] to distinguish error types (non-terminating, statement-terminating, script-terminating) · Issue #4781 · PowerShell/PowerShell
Description: As requested in #3158 and suggested by Steve Lee (@SteveL-MSFT) in #3647 (comment). Currently, you cannot derive from a [System.Management.Automation.ErrorRecord] instance whether it represents a non-terminating, a statement-terminating,...
Open Graph Description: As requested in #3158 and suggested by Steve Lee (@SteveL-MSFT) in #3647 (comment). Currently, you cannot derive from a [System.Management.Automation.ErrorRecord] instance whether it represents a n...
X Description: As requested in #3158 and suggested by Steve Lee (@SteveL-MSFT) in #3647 (comment). Currently, you cannot derive from a [System.Management.Automation.ErrorRecord] instance whether it represents a n...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/4781
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add a property to [System.Management.Automation.ErrorRecord] to distinguish error types (non-terminating, statement-terminating, script-terminating)","articleBody":"As requested in #3158 and suggested by @SteveL-MSFT \r\n in https://github.com/PowerShell/PowerShell/issues/3647#issuecomment-327844929.\r\n\r\nCurrently, you cannot derive from a `[System.Management.Automation.ErrorRecord]` instance whether it represents a non-terminating, a statement-terminating, or a script-terminating error.\r\n\r\nNote that, on the command line, you can already detect a _script_-terminating error generated with a `Throw` statement by examining the relevant `$Error` collection entry's `.Exception.WasThrownFromThrowStatement` property, but that won't work for errors that were _promoted_ to script-terminating ones via `-ErrorAction Stop` / `$ErrorActionPreference = 'Stop'` (such errors generate an _accompanying_ `[System.Management.Automation.ActionPreferenceStopException]` error).\r\n\r\nOne useful application for allowing the discovery of a given error's \"fatality\" would be to enable error-type-specific coloring of error output, as discussed in the context of improving the standard error view in #3647.\r\n\r\nAlso see the expanded proposal [below](https://github.com/PowerShell/PowerShell/issues/4781#issuecomment-329585446), which asks for _two_ properties: the _intrinsic_ severity, and the _effective_ severity.\r\n\r\nEnvironment data\r\n----------------\r\n\r\n```powershell\r\nPowerShell Core v6.0.0-beta.6\r\n```\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2017-09-08T03:10:55Z","url":"https://github.com/PowerShell/PowerShell/issues/4781"}
| 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:d9826f26-916d-ec7d-711f-7cd0e414e5cb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9876:9A536:26E46E0:366AD51:6AFD5015 |
| html-safe-nonce | 472b9f72df68d6685f71fb3617bff0e7a9ac553789b9f1c1444659b058f9c5f6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODc2OjlBNTM2OjI2RTQ2RTA6MzY2QUQ1MTo2QUZENTAxNSIsInZpc2l0b3JfaWQiOiI3ODYyMTk0NzgxMTA5OTY0ODIxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 14291a02c2196902379ff8edf1e44c84935add18f6441e4b44ac68fd0d558ba0 |
| hovercard-subject-tag | issue:256128639 |
| 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/4781/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6d962bce421c2c70fd32c400bbd44a58111ff702626085c8c35bdb9f7568ae68/PowerShell/PowerShell/issues/4781 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6d962bce421c2c70fd32c400bbd44a58111ff702626085c8c35bdb9f7568ae68/PowerShell/PowerShell/issues/4781 |
| og:image:alt | As requested in #3158 and suggested by Steve Lee (@SteveL-MSFT) in #3647 (comment). Currently, you cannot derive from a [System.Management.Automation.ErrorRecord] instance whether it represents a n... |
| 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 | 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