core icon indicating copy to clipboard operation
core copied to clipboard

Fix #672 - handle invalid UTF input more gently

Open wilzbach opened this issue 7 years ago • 3 comments

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

wilzbach avatar Feb 19 '18 02:02 wilzbach

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?)

aliak00 avatar Feb 20 '18 08:02 aliak00

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. :+1:

wilzbach avatar Feb 24 '18 12:02 wilzbach

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

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

wilzbach avatar Feb 24 '18 12:02 wilzbach