Exceptions

exception exporter.exceptions.PelicanError[source]

Base class for exceptions from within this project

exception exporter.exceptions.GoogleDriveError(reason)[source]

Raised if an error occurs interacting with a Google API.

Parameters:

reason (str) – the error message

exception exporter.exceptions.TagError(reason, full_tag=None, template_id=None)[source]

Base class for exceptions related to tags.

Parameters:
  • reason (str) – the error message

  • full_tag (str | None) – the tag as extracted from the template

  • template_id (str | None) – the file ID of the template in Google Docs

fill(full_tag, template_id)[source]

Add metadata to the exception to assist in debugging.

Parameters:
  • full_tag (str) – the tag as extracted from the template

  • template_id (str) – the file ID of the template in Google Docs

Return type:

TagError

as_dict()[source]

Return the exception as a dictionary (e.g. to serialize as JSON for the browser).

Return type:

Dict[str, str | None]

exception exporter.exceptions.TagSyntaxError(reason, full_tag=None, template_id=None)[source]

Raised if a tag is malformed.

Parameters:
  • reason (str)

  • full_tag (str | None)

  • template_id (str | None)

exception exporter.exceptions.UnknownTagError(reason, full_tag=None, template_id=None)[source]

Raised if a tag’s name is unrecognized.

Parameters:
  • reason (str)

  • full_tag (str | None)

  • template_id (str | None)

exception exporter.exceptions.TagArgumentError(reason, full_tag=None, template_id=None)[source]

Raised if a tag’s argument is invalid.

Parameters:
  • reason (str)

  • full_tag (str | None)

  • template_id (str | None)

exception exporter.exceptions.MissingArgumentError(reason, full_tag=None, template_id=None)[source]

Raised if a tag’s argument is missing.

Parameters:
  • reason (str)

  • full_tag (str | None)

  • template_id (str | None)

exception exporter.exceptions.CheckNotComputedError[source]

Raised if a check cannot be computed. The error message should be the check’s name.