valadas / Eraware_Dnn_Templates

Dnn templates
Other
19 stars 7 forks source link

Use OneOf for returning different results instead of using exceptions #701

Closed valadas closed 1 month ago

valadas commented 1 month ago

It is a pattern I have been using now in most projects, it is simple and enforces consumers to implement all possible returns. Exceptions don't enforce that and are heavier.