G-Node / nix

Neuroscience information exchange format
https://readthedocs.org/projects/nixio/
Other
68 stars 36 forks source link

provides a better error message when opening fails #773

Closed jgrewe closed 5 years ago

gicmo commented 5 years ago

Does anything speak against just throwing directly form checkHeader?

What I envisioned is checkHeader (bool do_not_throw) and then we call it with checkHeader ((flags & OpenFlags::Force) != OpenFlags::Force). And in the function, if do_not_throw is false and we encounter an error we throw.