00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 """Exceptions raised by the BSON package."""
00016
00017
00018 class BSONError(Exception):
00019 """Base class for all BSON exceptions.
00020 """
00021
00022
00023 class InvalidBSON(BSONError):
00024 """Raised when trying to create a BSON object from invalid data.
00025 """
00026
00027
00028 class InvalidStringData(BSONError):
00029 """Raised when trying to encode a string containing non-UTF8 data.
00030 """
00031
00032
00033 class InvalidDocument(BSONError):
00034 """Raised when trying to create a BSON object from an invalid document.
00035 """
00036
00037
00038 class InvalidId(BSONError):
00039 """Raised when trying to create an ObjectId from invalid data.
00040 """