RFC: std.json sucessor

via Digitalmars-d digitalmars-d at puremagic.com
Fri Aug 22 08:56:33 PDT 2014


On Friday, 22 August 2014 at 15:47:51 UTC, Jacob Carlborg wrote:
> * I think we have talked about this before, when reviewing D 
> lexers. I'm thinking of how to handle invalid data. Is it the 
> best solution to throw an exception? Would it be possible to 
> return an error token and have the client decide what to do 
> about?

Hmm... my initial reaction was "not as default - it should throw 
on error, otherwise noone will check for errors". But if it's 
returning an error token, maybe it would be sufficient if that 
token throws when its value is accessed?


More information about the Digitalmars-d mailing list