Skip to content

Commit

Permalink
enh: introduce BadFileFormatError
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Oct 24, 2018
1 parent d038170 commit d278d24
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
0.6.3
- enh: introduce BadFileFormatError
0.6.2
- maintenance release
0.6.1
Expand Down
1 change: 1 addition & 0 deletions qpformat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from ._version import version as __version__ # noqa: F401
from .core import load_data # noqa: F401
from . import file_formats # noqa: F401
from .file_formats import BadFileFormatError # noqa: F401
10 changes: 7 additions & 3 deletions qpformat/file_formats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,24 @@
from .single_tif_phasics import SingleTifPhasics


class MultipleFormatsNotSupportedError(BaseException):
class BadFileFormatError(BaseException):
"""Base class for file format errors"""


class MultipleFormatsNotSupportedError(BadFileFormatError):
"""Used when a folder contains series file formats
(see `GitHub issue #1 <https://github.com/RI-imaging/qpformat/issues/1>`__)
"""
pass


class UnknownFileFormatError(BaseException):
class UnknownFileFormatError(BadFileFormatError):
"""Used when a file format could not be detected"""
pass


class WrongFileFormatError(BaseException):
class WrongFileFormatError(BadFileFormatError):
"""Used when a wrong file format is used"""
pass

Expand Down

0 comments on commit d278d24

Please sign in to comment.