Skip to content

Issue 2860 - Ignore and SIlentlyContinue ErrorActions are not honored#3139

Closed
dantraMSFT wants to merge 1 commit into
PowerShell:masterfrom
dantraMSFT:dantra-issue2860
Closed

Issue 2860 - Ignore and SIlentlyContinue ErrorActions are not honored#3139
dantraMSFT wants to merge 1 commit into
PowerShell:masterfrom
dantraMSFT:dantra-issue2860

Conversation

@dantraMSFT
Copy link
Copy Markdown
Contributor

Fix #2860
This change considers JSON parsing errors as non-terminating errors to enable support for ErrorAction. Previously, parsing errors were reported as terminating errors.

This is a potential breaking change for code that expected a terminating error.

@dantraMSFT dantraMSFT added Review - Committee The PR/Issue needs a review from the PowerShell Committee Review - Needed The PR is being reviewed labels Feb 13, 2017
@joeyaiello
Copy link
Copy Markdown
Contributor

@PowerShell/powershell-committee (subset of @HemantMahawar @lzybkr @khansen00 and myself) agree that the original issue (#2860) is by design. It is unreasonable for ConvertFrom-Json to emit anything but an error when receiving malformed input, and terminating errors are not respected by -ErrorAction. If a developer absolutely wants to make a conscious choice to ignore that terminating error, they should use try/catch.

@joeyaiello joeyaiello closed this Feb 16, 2017
@dantraMSFT dantraMSFT deleted the dantra-issue2860 branch February 21, 2017 19:10
@iSazonov iSazonov added Committee-Reviewed PS-Committee has reviewed this and made a decision and removed Review - Committee The PR/Issue needs a review from the PowerShell Committee Review - Needed The PR is being reviewed labels Mar 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Committee-Reviewed PS-Committee has reviewed this and made a decision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants