Skip to content

Commit

Permalink
chore: Use exc_info to log the error
Browse files Browse the repository at this point in the history
  • Loading branch information
micha91 committed Aug 15, 2024
1 parent 2e172c5 commit 888a787
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions capella2polarion/converters/document_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,10 @@ def _get_and_customize_doc(
)
except Exception as e:
logger.error(
"Rendering for document %s/%s failed with the following errors %s",
"Rendering for document %s/%s failed with the following error",
instance.polarion_space,
instance.polarion_name,
"\n".join(str(e) for e in e.args),
exc_info=e,
)
continue

Expand All @@ -369,10 +369,10 @@ def _get_and_customize_doc(
)
except Exception as e:
logger.error(
"Rendering for document %s/%s failed with the following errors %s",
"Rendering for document %s/%s failed with the following error",
instance.polarion_space,
instance.polarion_name,
"\n".join(str(e) for e in e.args),
exc_info=e,
)
continue

Expand All @@ -397,14 +397,23 @@ def _get_and_customize_doc(
instance.polarion_name,
)
continue
try:
new_doc, work_items = self.update_mixed_authority_document(
old_doc,
config.template_directory,
config.sections,
instance.params,
instance.section_params,
)
except Exception as e:
logger.error(
"Rendering for document %s/%s failed with the following error",
instance.polarion_space,
instance.polarion_name,
exc_info=e,
)
continue

new_doc, work_items = self.update_mixed_authority_document(
old_doc,
config.template_directory,
config.sections,
instance.params,
instance.section_params,
)
updated_docs.append(new_doc)
work_items += work_items

Expand Down

0 comments on commit 888a787

Please sign in to comment.