Skip to content

Investigate of a custom exception hierarchy #213

@tomschr

Description

@tomschr

Situation

Currently, exceptions work fine in Docbuild. However, we are unsure if this might become important in the future.

Use Case

For example, a ValueError may be a bit too unspecific for certain situations. A more specific, docbuild-ish custom exception could be helpful.

Possible Implementation

A small set of custom exception may be helpful:

  • DocbuildError(Exception): a base exception for all custom exceptions raised by this tool.
  • ConfigError(DocbuildError): a base exception for any configuration-related failures.
  • InvalidConfigError(ConfigError, ValueError): for configuration errors that doesn't adhere to the model (for TOML) or contains validation errors (for portal files).
  • ModelValidationError(DocbuildError, ValueError): A base for errors during data model processing.
  • RepositoryError(DocbuildError): A base for Git-related failures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions