# Path: botoflow/core/exceptions.py
# class CancelledError(Exception):
#     """
#     The Future was cancelled
#     """
# 
#     @property
#     def cause(self):
#         return self


import sys
import traceback
from .core.exceptions import CancelledError
                "cause=%r>") % (
                    self.__class__.__name__, hex(id(self)),
                    self.event_id, self.activity_type, self.activity_id,
                    self.cause)


class ActivityTaskTimedOutError(ActivityTaskError):
    """This exception is thrown if an activity was timed out by Amazon
    SWF. This could happen if the activity task could not be assigned to the
    worker within the require time period or could not be completed by the
    worker in the required time. You can set these timeouts on the activity
    using the :py:func:`~botoflow.decorators.activity` decorator or using the
    :py:func:`~botoflow.options_overrides.activity_options` context manager
    when calling the activity method.
    """

    def __init__(self, event_id, activity_type, activity_id, timeout_type):
        super(
            ActivityTaskTimedOutError, self).__init__(event_id, activity_type,
                                                      activity_id)
        self.timeout_type = timeout_type

    def __repr__(self):
        return ("<%s at %s event_id=%s activity_type=%s activity_id=%s "
                "timeout_type=%s>") % (
                    self.__class__.__name__, hex(id(self)),
                    self.event_id, self.activity_type, self.activity_id,
                    self.timeout_type)



# Path: botoflow/core/exceptions.py
# class CancelledError(Exception):
#     """
#     The Future was cancelled
#     """
# 
#     @property
#     def cause(self):
#         return self


# Path: botoflow/exceptions.py
import sys
import traceback
from .core.exceptions import CancelledError

                "cause=%r>") % (
                    self.__class__.__name__, hex(id(self)),
                    self.event_id, self.activity_type, self.activity_id,
                    self.cause)


class ActivityTaskTimedOutError(ActivityTaskError):
    """This exception is thrown if an activity was timed out by Amazon
    SWF. This could happen if the activity task could not be assigned to the
    worker within the require time period or could not be completed by the
    worker in the required time. You can set these timeouts on the activity
    using the :py:func:`~botoflow.decorators.activity` decorator or using the
    :py:func:`~botoflow.options_overrides.activity_options` context manager
    when calling the activity method.
    """

    def __init__(self, event_id, activity_type, activity_id, timeout_type):
        super(
            ActivityTaskTimedOutError, self).__init__(event_id, activity_type,
                                                      activity_id)
        self.timeout_type = timeout_type

    def __repr__(self):
        return ("<%s at %s event_id=%s activity_type=%s activity_id=%s "
                "timeout_type=%s>") % (
                    self.__class__.__name__, hex(id(self)),
                    self.event_id, self.activity_type, self.activity_id,
                    self.timeout_type)



class ActivityTaskCanceledError(CancelledError, ActivityTaskError, DecisionExceptionWithTracebackMixIn):