G-Node / G-Node/nixpy

Avoid exceptions in Validator

Open
#410 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
22
Forks
29
PR merge metrics
No merged PRs in 30d

Description

In some cases we can get exceptions raised in the Validator. Sometimes we even catch errors and raise them explicitly:

https://github.com/G-Node/nixpy/blob/40b5ecdaa9b074c7bf73137d1a94cb84fcbae5be/nixio/validate.py#L160

We should instead convert these to validation errors and we should even catch other exceptions where possible and convert them to validation errors or warnings where appropriate.

Raising an exception in a case like above, where dimension counts don't match, makes it impossible for the user to later inspect the validator report and fix the problem.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.