2017-07-24 13:26:22 +02:00
|
|
|
|
2016-09-26 00:26:09 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
2017-08-28 19:01:53 +02:00
|
|
|
|
2016-09-26 00:26:09 +02:00
|
|
|
class PyMISPError(Exception):
|
|
|
|
def __init__(self, message):
|
|
|
|
super(PyMISPError, self).__init__(message)
|
|
|
|
self.message = message
|
|
|
|
|
|
|
|
|
|
|
|
class NewEventError(PyMISPError):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class NewAttributeError(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-11-09 02:33:55 +01:00
|
|
|
|
2017-08-28 19:01:53 +02:00
|
|
|
class UnknownMISPObjectTemplate(MISPObjectException):
|
|
|
|
"""Exception raised when the template is unknown"""
|
|
|
|
pass
|