Skip to content

Catch a more general exception and report it#4895

Merged
Rick-Anderson merged 1 commit intodotnet:masterfrom
guardrex:patch-6
Nov 29, 2017
Merged

Catch a more general exception and report it#4895
Rick-Anderson merged 1 commit intodotnet:masterfrom
guardrex:patch-6

Conversation

@guardrex
Copy link
Copy Markdown
Collaborator

RE: File Uploads section of RP tutorial (FileHelper.cs)

When the StreamReader chokes on bytes for a Unicode conversion, it throws a DecoderFallbackException:

DecoderFallbackException: Unable to translate bytes [97] at index 301 from specified code page to Unicode.

I recommend we catch a more general exception and then just report the error Message back to the user.

The result of this will look like this in the UI ...

capture

@Rick-Anderson Rick-Anderson merged commit f0503ec into dotnet:master Nov 29, 2017
@Rick-Anderson
Copy link
Copy Markdown
Contributor

@guardrex I agree, nice work.

@guardrex guardrex deleted the patch-6 branch November 29, 2017 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants