Source code for pymisp.exceptions
from __future__ import annotations
[docs]
class PyMISPError(Exception):
def __init__(self, message: str) -> None:
super().__init__(message)
self.message = message
[docs]
class NewEventError(PyMISPError):
pass
class UpdateEventError(PyMISPError):
pass
[docs]
class NewAttributeError(PyMISPError):
pass
class NewEventReportError(PyMISPError):
pass
class NewAnalystDataError(PyMISPError):
pass
class NewNoteError(PyMISPError):
pass
class NewOpinionError(PyMISPError):
pass
class NewRelationshipError(PyMISPError):
pass
class UpdateAttributeError(PyMISPError):
pass
class NewGalaxyClusterError(PyMISPError):
pass
class NewGalaxyClusterRelationError(PyMISPError):
pass
class SearchError(PyMISPError):
pass
class MissingDependency(PyMISPError):
pass
[docs]
class NoURL(PyMISPError):
pass
[docs]
class NoKey(PyMISPError):
pass
class MISPAttributeException(PyMISPError):
"""A base class for attribute specific exceptions"""
class MISPObjectException(PyMISPError):
"""A base class for object specific exceptions"""
class InvalidMISPAttribute(MISPAttributeException):
"""Exception raised when an attribute doesn't respect the constraints in the definition"""
class InvalidMISPObjectAttribute(MISPAttributeException):
"""Exception raised when an object attribute doesn't respect the constraints in the definition"""
[docs]
class InvalidMISPObject(MISPObjectException):
"""Exception raised when an object doesn't respect the constraints in the definition"""
[docs]
class UnknownMISPObjectTemplate(MISPObjectException):
"""Exception raised when the template is unknown"""
class InvalidMISPGalaxy(PyMISPError):
pass
class MISPServerError(PyMISPError):
pass
class PyMISPNotImplementedYet(PyMISPError):
pass
class PyMISPUnexpectedResponse(PyMISPError):
pass
class PyMISPEmptyResponse(PyMISPError):
pass