From ed2074ae88f2db6cb6b38716b43b35e29eb2e16c Mon Sep 17 00:00:00 2001 From: Matthias Baumgartner Date: Fri, 23 Dec 2022 16:25:51 +0100 Subject: filematcher: check file properties, formulate them as a string --- bsie/base/errors.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bsie/base/errors.py') diff --git a/bsie/base/errors.py b/bsie/base/errors.py index dc3c30e..5fafd5b 100644 --- a/bsie/base/errors.py +++ b/bsie/base/errors.py @@ -39,4 +39,7 @@ class ProgrammingError(_BSIEError): class UnreachableError(ProgrammingError): """Bravo, you've reached a point in code that should logically not be reachable.""" +class ParserError(_BSIEError): + """Failed to parse due to invalid syntax or structures.""" + ## EOF ## -- cgit v1.2.3 From 266c2c9a072bf3289fd7f2d75278b7d59528378c Mon Sep 17 00:00:00 2001 From: Matthias Baumgartner Date: Sat, 24 Dec 2022 10:27:09 +0100 Subject: package restructuring: base * Reader and Extractor to respective reader/extractor modules * ReaderBuilder to reader module * ExtractorBuilder to extractor module * Loading module in utils (safe_load, unpack_name) * Pipeline and PipelineBuilder to lib module * errors to utils * documentation: "standard import" and "external import" --- bsie/base/errors.py | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 bsie/base/errors.py (limited to 'bsie/base/errors.py') diff --git a/bsie/base/errors.py b/bsie/base/errors.py deleted file mode 100644 index 5fafd5b..0000000 --- a/bsie/base/errors.py +++ /dev/null @@ -1,45 +0,0 @@ -"""Common BSIE exceptions. - -Part of the bsie module. -A copy of the license is provided with the project. -Author: Matthias Baumgartner, 2022 -""" -# imports -import typing - -# exports -__all__: typing.Sequence[str] = ( - 'BuilderError', - 'ExtractorError', - 'LoaderError', - 'ReaderError', - ) - - -## code ## - -class _BSIEError(Exception): - """Generic BSIE error.""" - -class BuilderError(_BSIEError): - """The Builder failed to create an instance.""" - -class LoaderError(BuilderError): - """Failed to load a module or class.""" - -class ExtractorError(_BSIEError): - """The Extractor failed to process the given content.""" - -class ReaderError(_BSIEError): - """The Reader failed to read the given file.""" - -class ProgrammingError(_BSIEError): - """An assertion-like error that indicates a code-base issue.""" - -class UnreachableError(ProgrammingError): - """Bravo, you've reached a point in code that should logically not be reachable.""" - -class ParserError(_BSIEError): - """Failed to parse due to invalid syntax or structures.""" - -## EOF ## -- cgit v1.2.3