diff --git a/bibtexparser/splitter.py b/bibtexparser/splitter.py index a4f6afc..158924e 100644 --- a/bibtexparser/splitter.py +++ b/bibtexparser/splitter.py @@ -291,8 +291,8 @@ def split(self, library: Optional[Library] = None) -> Library: f"due to syntactical error in bibtex:\n {e.abort_reason}" ) logger.info( - "We will try to continue parsing, but this might lead to unexpected results." - "The failed block will be stored in the `failed_blocks`of the library." + "We will try to continue parsing, but this might lead to unexpected results. " + "The failed block will be stored in the `failed_blocks` of the library." ) library.add( ParsingFailedBlock( @@ -308,14 +308,14 @@ def split(self, library: Optional[Library] = None) -> Library: "python-bibtexparser detected an invalid state. Please report this bug." ) logger.error(e.message) - raise e - except Exception as e: + raise + except Exception: # For unknown exceptions, we want to fail hard and get the info in our issue tracker. logger.error( - f"Unexpected exception while parsing `{m_val}` block (line {start_line})" + f"Unexpected exception while parsing `{m_val}` block (line {start_line}). " "Please report this bug." ) - raise e + raise self._reset_block_status(current_char_index=self._current_char_index + 1) else: