Source code for maltoolbox.exceptions

[docs] class MalToolboxException(Exception): """Base exception for all other maltoolbox exceptions to inherit from."""
[docs] class LanguageGraphException(MalToolboxException): """Base exception for all language-graph related exceptions."""
[docs] class LanguageGraphSuperAssetNotFoundError(LanguageGraphException): """Asset's super asset not found in language graph during attack graph construction."""
[docs] class LanguageGraphAssociationError(LanguageGraphException): """Error in building an association. For example, right or left-hand side asset of association missing in language graph. """
[docs] class LanguageGraphStepExpressionError(LanguageGraphException): """A target asset cannot be linked with for a step expression."""
[docs] class AttackGraphException(MalToolboxException): """Base exception for all attack-graph related exceptions."""
[docs] class AttackGraphStepExpressionError(AttackGraphException): """A target attack step cannot be linked with for a step expression."""
[docs] class ModelException(MalToolboxException): """Base Exception for all Model related exceptions"""
[docs] class ModelAssociationException(ModelException): """Exception related to associations in Model"""
[docs] class DuplicateModelAssociationError(ModelException): """Associations should be unique as part of Model"""