"""Parser errors.""" class ParserError(Exception): """Raised when parser failed to extract/parse some fields.""" def __init__(self, message: str, exception: object): """Construct a new ParserError.""" self.message = f'{message} {str(exception)}' def __str__(self) -> str: """Return a string representation of the exception.""" return self.message PARSE_FIELDS_ERROR = 'Failed to parse fields' PARSE_NODE_RELATIONSHIP_FIELDS_ERROR = \ 'Failed to parse the relationship fields' PARSE_RELATIONSHIP_METADATA_ERROR = 'Failed to parse the relationship metadata' PARSE_OPERATION_ERROR = 'Failed to parse the operation.' PARSE_TIMESTAMP_ERROR = 'Failed to parse the timestamp.' PARSE_TABLE_ERROR = 'Failed to parse the table.' PARSE_META_ERROR = 'Failed to parse the metadata.'