2020-04-13 15:37:11 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
2020-03-30 23:28:34 +02:00
|
|
|
"""Custom package exceptions."""
|
|
|
|
|
|
|
|
|
|
|
|
class CoreNetworksException(Exception):
|
|
|
|
"""The main exception class."""
|
|
|
|
|
2020-04-11 12:05:42 +02:00
|
|
|
def __init__(self, msg, payload=None):
|
|
|
|
super(CoreNetworksException, self).__init__(msg)
|
2020-03-30 23:28:34 +02:00
|
|
|
self.payload = payload
|
|
|
|
|
|
|
|
|
|
|
|
class CorenetworksError(CoreNetworksException):
|
|
|
|
"""Authentication errors exception class."""
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class ValidationError(CoreNetworksException):
|
|
|
|
"""Authentication errors exception class."""
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class AuthError(CoreNetworksException):
|
|
|
|
"""Authentication errors exception class."""
|
|
|
|
|
|
|
|
pass
|