"Exceptions will fade away in modern languages"

Ola Fosheim Grostad ola.fosheim.grostad at gmail.com
Thu Nov 26 07:40:43 UTC 2020


On Thursday, 26 November 2020 at 04:41:57 UTC, Dukc wrote:
> less general when using them. For example, when parsing XML and 
> encountering a syntax error, if I throw on the error I 
> essentially declare that my function is only intended for 
> generally sound XML -it isn't intended to count or list syntax 
> errors in a text full of them. Errors in return codes are use 
> case agnostic in this regard. Perhaps this is one of the 
> reasons why Walter considers exceptions an aged concept.

Provide a templated object for custom error tracking and return a 
pointer to it wrapped as an exception.

That would be the most general approach.


More information about the Digitalmars-d mailing list