greyblake/nutype

Should define a Error type rather than generate error type for every struct

yjhmelody opened this issue · 1 comments

The generated error type is not very useful.

The idea of a specific error for every particular struct is that:

  • Looking at the definition of error type one can easily say which validation rules are there
  • It enables exhaustive error handling

In the further versions I am planning to introduce something like GenericValidationError, so every specific validation error will be convertable into GenericValidationError