hermes.model.error

Exceptions

HermesValidationError

This exception should be raised when an error occurs during input validation (e.g., during harvest).

HermesCacheError

This exception should be raised when interacting with the model context.

HermesMergeError

This exception should be raised when there is an error during a merge / set operation.

Module Contents

exception hermes.model.error.HermesValidationError

Bases: Exception

This exception should be raised when an error occurs during input validation (e.g., during harvest).

To be able to track and fix the error, you should use this in conjunction with the original exception if applicable:

try:
     validate_some_data(src_file)
except ValueError as e:
    raise HermesValidationError(src_file) from e
exception hermes.model.error.HermesCacheError

Bases: Exception

This exception should be raised when interacting with the model context. # TODO Change class name and docstring if we decide to call it differently # TODO in softwarepub/hermes#392.

To be able to track and fix the error, you should use this in conjunction with the original exception if applicable:

try:
     context[term]
except ValueError as e:
    raise HermesCacheError(term) from e
exception hermes.model.error.HermesMergeError(path: list[str | int], old_value: Any, new_value: Any, **kwargs)

Bases: Exception

This exception should be raised when there is an error during a merge / set operation.

path

The path where the merge error occurred.

Type:

list[str | int]

old_value

Old value that was stored at path.

Type:

Any

new_value

New value that was to be assigned .

Type:

Any

tag

Tag data for the new value.