PyMISP/pymisp/exceptions.py

90 lines
1.3 KiB
Python
Raw Normal View History

from __future__ import annotations
2017-08-28 19:01:53 +02:00
class PyMISPError(Exception):
def __init__(self, message: str) -> None:
super().__init__(message)
self.message = message
class NewEventError(PyMISPError):
pass
2018-08-21 00:32:27 +02:00
class UpdateEventError(PyMISPError):
pass
class NewAttributeError(PyMISPError):
pass
class NewEventReportError(PyMISPError):
pass
2018-08-21 00:32:27 +02:00
class UpdateAttributeError(PyMISPError):
pass
2021-01-16 16:56:30 +01:00
class NewGalaxyClusterError(PyMISPError):
pass
class NewGalaxyClusterRelationError(PyMISPError):
pass
class SearchError(PyMISPError):
pass
class MissingDependency(PyMISPError):
pass
class NoURL(PyMISPError):
pass
class NoKey(PyMISPError):
pass
2017-08-28 19:01:53 +02:00
class MISPObjectException(PyMISPError):
pass
class InvalidMISPObject(MISPObjectException):
"""Exception raised when an object doesn't respect the contrains in the definition"""
pass
2017-08-28 19:01:53 +02:00
class UnknownMISPObjectTemplate(MISPObjectException):
"""Exception raised when the template is unknown"""
pass
2018-01-08 11:59:32 +01:00
class InvalidMISPGalaxy(PyMISPError):
pass
2018-01-08 11:59:32 +01:00
class PyMISPInvalidFormat(PyMISPError):
pass
2018-08-09 18:11:45 +02:00
2018-08-21 00:32:27 +02:00
2018-08-09 18:11:45 +02:00
class MISPServerError(PyMISPError):
pass
class PyMISPNotImplementedYet(PyMISPError):
pass
class PyMISPUnexpectedResponse(PyMISPError):
2020-01-30 11:44:13 +01:00
pass
class PyMISPEmptyResponse(PyMISPError):
pass