# Path: coolamqp/framing/definitions.py
# HARD_ERRORS = [
#     CONNECTION_FORCED, INVALID_PATH, FRAME_ERROR, SYNTAX_ERROR,
#     COMMAND_INVALID, CHANNEL_ERROR, UNEXPECTED_FRAME, RESOURCE_ERROR,
#     NOT_ALLOWED, NOT_IMPLEMENTED, INTERNAL_ERROR
# ]
# 
# RESOURCE_LOCKED = 405


from coolamqp.framing.definitions import HARD_ERRORS, RESOURCE_LOCKED
        from coolamqp.framing.definitions import ConnectionClose, ChannelClose
# coding=UTF-8
from __future__ import absolute_import, division, print_function


__all__ = ['HARD_ERRORS', 'RESOURCE_LOCKED', 'CoolAMQPError', 'ConnectionDead', 'AMQPError']


class CoolAMQPError(Exception):
    """Base class for CoolAMQP errors"""


class ConnectionDead(CoolAMQPError):
    """
    Operation could be not completed because some other error
    than a legit AMQPError occurred, such as exploding kitten
    """


class AMQPError(CoolAMQPError):
    """
    Base class for errors received from AMQP server
    """

    def is_hard_error(self):  # type: () -> bool
        """Does this error close the connection?"""

# Path: coolamqp/framing/definitions.py
# HARD_ERRORS = [
#     CONNECTION_FORCED, INVALID_PATH, FRAME_ERROR, SYNTAX_ERROR,
#     COMMAND_INVALID, CHANNEL_ERROR, UNEXPECTED_FRAME, RESOURCE_ERROR,
#     NOT_ALLOWED, NOT_IMPLEMENTED, INTERNAL_ERROR
# ]
# 
# RESOURCE_LOCKED = 405


# Path: coolamqp/exceptions.py
from coolamqp.framing.definitions import HARD_ERRORS, RESOURCE_LOCKED
        from coolamqp.framing.definitions import ConnectionClose, ChannelClose

# coding=UTF-8
from __future__ import absolute_import, division, print_function


__all__ = ['HARD_ERRORS', 'RESOURCE_LOCKED', 'CoolAMQPError', 'ConnectionDead', 'AMQPError']


class CoolAMQPError(Exception):
    """Base class for CoolAMQP errors"""


class ConnectionDead(CoolAMQPError):
    """
    Operation could be not completed because some other error
    than a legit AMQPError occurred, such as exploding kitten
    """


class AMQPError(CoolAMQPError):
    """
    Base class for errors received from AMQP server
    """

    def is_hard_error(self):  # type: () -> bool
        """Does this error close the connection?"""

        return self.reply_code in HARD_ERRORS