Exceptions#

Inside all of our logic behind it, we have created supplementary exceptions to explain what could have gone wrong either in your template, or potentially what could have badly happened.

exception fabricius.exceptions.FabriciusError(error: object | None = None)#

An error was raised inside Fabricius.

All exceptions of the Fabricius library must subclass this exception.

exception fabricius.exceptions.MissingRequiredValueError(instance: object, missing_value: str)#

Exception raised when a required value was not set inside an object.

Parameters:
  • instance (object) – The object that holds the missing value.

  • missing_value (str) – The value that was not set.

exception fabricius.exceptions.AlreadyCommittedError(file_name: str)#

A file has already been committed/persisted.

Parameters:

file_name (str) – The file’s name that has already been committed.

exception fabricius.exceptions.ConflictError(instance: object, reason: str)#

Conflicting parameters between objects.

This mean that Fabricius cannot continue its work because there would be a conflict between one or two objects.

For example, this error can be raised when two files have the same name in the same destination folder.

Parameters:
  • instance (object) – The conflicting object.

  • reason (str) – The reason for the conflict.

exception fabricius.exceptions.TemplateError(template_name: str, reason: str)#

The template has an error that cannot be automatically handled by Fabricius.

Parameters:
  • template_name (str) – The name of the template that raised the error.

  • reason (str) – The reason for the error.