# Path: boto/exception.py
# class BotoServerError(StandardError):
# 
#     def __init__(self, status, reason, body=None, *args):
#         StandardError.__init__(self, status, reason, body, *args)
#         self.status = status
#         self.reason = reason
#         self.body = body or ''
#         self.request_id = None
#         self.error_code = None
#         self.error_message = None
#         self.box_usage = None
# 
#         # Attempt to parse the error response. If body isn't present,
#         # then just ignore the error response.
#         if self.body:
#             try:
#                 h = handler.XmlHandler(self, self)
#                 xml.sax.parseString(self.body, h)
#             except (TypeError, xml.sax.SAXParseException), pe:
#                 # Remove unparsable message body so we don't include garbage
#                 # in exception. But first, save self.body in self.error_message
#                 # because occasionally we get error messages from Eucalyptus
#                 # that are just text strings that we want to preserve.
#                 self.error_message = self.body
#                 self.body = None
# 
#     def __getattr__(self, name):
#         if name == 'message':
#             return self.error_message
#         if name == 'code':
#             return self.error_code
#         raise AttributeError
# 
#     def __repr__(self):
#         return '%s: %s %s\n%s' % (self.__class__.__name__,
#                                   self.status, self.reason, self.body)
# 
#     def __str__(self):
#         return '%s: %s %s\n%s' % (self.__class__.__name__,
#                                   self.status, self.reason, self.body)
# 
#     def startElement(self, name, attrs, connection):
#         pass
# 
#     def endElement(self, name, value, connection):
#         if name in ('RequestId', 'RequestID'):
#             self.request_id = value
#         elif name == 'Code':
#             self.error_code = value
#         elif name == 'Message':
#             self.error_message = value
#         elif name == 'BoxUsage':
#             self.box_usage = value
#         return None
# 
#     def _cleanupParsedProperties(self):
#         self.request_id = None
#         self.error_code = None
#         self.error_message = None
#         self.box_usage = None
# 
# class BotoClientError(StandardError):
#     """
#     General Boto Client error (error accessing AWS)
#     """
# 
#     def __init__(self, reason, *args):
#         StandardError.__init__(self, reason, *args)
#         self.reason = reason
# 
#     def __repr__(self):
#         return 'BotoClientError: %s' % self.reason
# 
#     def __str__(self):
#         return 'BotoClientError: %s' % self.reason


from boto.exception import BotoServerError, BotoClientError
"""
Exceptions that are specific to the dynamodb module.
"""

class DynamoDBExpiredTokenError(BotoServerError):
    """
    Raised when a DynamoDB security token expires. This is generally boto's
    (or the user's) notice to renew their DynamoDB security tokens.
    """
    pass



# Path: boto/exception.py
# class BotoServerError(StandardError):
# 
#     def __init__(self, status, reason, body=None, *args):
#         StandardError.__init__(self, status, reason, body, *args)
#         self.status = status
#         self.reason = reason
#         self.body = body or ''
#         self.request_id = None
#         self.error_code = None
#         self.error_message = None
#         self.box_usage = None
# 
#         # Attempt to parse the error response. If body isn't present,
#         # then just ignore the error response.
#         if self.body:
#             try:
#                 h = handler.XmlHandler(self, self)
#                 xml.sax.parseString(self.body, h)
#             except (TypeError, xml.sax.SAXParseException), pe:
#                 # Remove unparsable message body so we don't include garbage
#                 # in exception. But first, save self.body in self.error_message
#                 # because occasionally we get error messages from Eucalyptus
#                 # that are just text strings that we want to preserve.
#                 self.error_message = self.body
#                 self.body = None
# 
#     def __getattr__(self, name):
#         if name == 'message':
#             return self.error_message
#         if name == 'code':
#             return self.error_code
#         raise AttributeError
# 
#     def __repr__(self):
#         return '%s: %s %s\n%s' % (self.__class__.__name__,
#                                   self.status, self.reason, self.body)
# 
#     def __str__(self):
#         return '%s: %s %s\n%s' % (self.__class__.__name__,
#                                   self.status, self.reason, self.body)
# 
#     def startElement(self, name, attrs, connection):
#         pass
# 
#     def endElement(self, name, value, connection):
#         if name in ('RequestId', 'RequestID'):
#             self.request_id = value
#         elif name == 'Code':
#             self.error_code = value
#         elif name == 'Message':
#             self.error_message = value
#         elif name == 'BoxUsage':
#             self.box_usage = value
#         return None
# 
#     def _cleanupParsedProperties(self):
#         self.request_id = None
#         self.error_code = None
#         self.error_message = None
#         self.box_usage = None
# 
# class BotoClientError(StandardError):
#     """
#     General Boto Client error (error accessing AWS)
#     """
# 
#     def __init__(self, reason, *args):
#         StandardError.__init__(self, reason, *args)
#         self.reason = reason
# 
#     def __repr__(self):
#         return 'BotoClientError: %s' % self.reason
# 
#     def __str__(self):
#         return 'BotoClientError: %s' % self.reason


# Path: boto/dynamodb/exceptions.py
from boto.exception import BotoServerError, BotoClientError

"""
Exceptions that are specific to the dynamodb module.
"""

class DynamoDBExpiredTokenError(BotoServerError):
    """
    Raised when a DynamoDB security token expires. This is generally boto's
    (or the user's) notice to renew their DynamoDB security tokens.
    """
    pass



class DynamoDBKeyNotFoundError(BotoClientError):