esheldon / psfex

python and C codes to interpolate and reconstruct psfex images
GNU General Public License v3.0
19 stars 6 forks source link

No python-layer notification of a failure in `_psfex_pywrap.PSFEx`` #4

Closed rmjarvis closed 9 years ago

rmjarvis commented 9 years ago

It is possible for _psfex_pywrap.PSFEx to return None rather than a valid PSFEx object. In this case, later calls to get_rec, etc. give somewhat non-obvious AttributeErrors.

It would be nice if the PSFEx.__init__ method could check if the constructor failed with if self._psfex is None: and raising a more descriptive exception about what the problem was, or at least that there was a problem.

esheldon commented 9 years ago

this is a bug, it should be raising an exception, probably IOError

esheldon commented 9 years ago

closed via be1acdcd56f7351dab06b80edd8117c1e2c68122

I used a ValueError