pepkit / eido

Validator for PEP objects
http://eido.databio.org
BSD 2-Clause "Simplified" License
4 stars 6 forks source link

Handling errors #60

Open nsheff opened 1 year ago

nsheff commented 1 year ago

Right now, the validation functions are printing out notices and then raising exceptions. Instead, what if the raising of exception should happen by the calling tool?

The validation function would collect and format the errors. Then, the calling function should decide what to do with it. For example, in the case of the CLI, it should print it out. But in other cases, we may just want a list of the validation error. So, should the printing move from the validation function to the calling context?

nsheff commented 9 months ago

We may have addressed this to some degree in https://github.com/pepkit/eido/pull/61/commits/f517108349a3f5af3a551fe050f26b10d7680b4f