Skip to content

Fix #672 - handle invalid UTF input more gently#673

Open
wilzbach wants to merge 1 commit intodlang-tour:masterfrom
wilzbach:fix-672
Open

Fix #672 - handle invalid UTF input more gently#673
wilzbach wants to merge 1 commit intodlang-tour:masterfrom
wilzbach:fix-672

Conversation

@wilzbach
Copy link
Member

I'm not so sure about this. It will create a lot of overhead :/

@aliak00
Copy link

aliak00 commented Feb 20, 2018

Could an option be to handle it lazily? I.e. wrap in try/catch and do the decoding only if there's an exception?

Or writefln it? (since it seems like writeln deals with this?)

@wilzbach
Copy link
Member Author

I.e. wrap in try/catch and do the decoding only if there's an exception?

Yeah that does sound like the reasonable thing to do. 👍

@wilzbach
Copy link
Member Author

core.exception.AssertError@source/rest/apiv1.d(255): unittest failure
----------------
??:? _d_unittestp [0xdb1f6d]

Urgh that passes on my local machine (added debug output)

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