xtquant.xtbson.bson36.errors

Exceptions raised by the BSON package.

 1# Copyright 2009-present MongoDB, Inc.
 2#
 3# Licensed under the Apache License, Version 2.0 (the "License");
 4# you may not use this file except in compliance with the License.
 5# You may obtain a copy of the License at
 6#
 7# http://www.apache.org/licenses/LICENSE-2.0
 8#
 9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15"""Exceptions raised by the BSON package."""
16
17
18class BSONError(Exception):
19    """Base class for all BSON exceptions."""
20
21
22class InvalidBSON(BSONError):
23    """Raised when trying to create a BSON object from invalid data."""
24
25
26class InvalidStringData(BSONError):
27    """Raised when trying to encode a string containing non-UTF8 data."""
28
29
30class InvalidDocument(BSONError):
31    """Raised when trying to create a BSON object from an invalid document."""
32
33
34class InvalidId(BSONError):
35    """Raised when trying to create an ObjectId from invalid data."""
class BSONError(builtins.Exception):
19class BSONError(Exception):
20    """Base class for all BSON exceptions."""

Base class for all BSON exceptions.

Inherited Members
builtins.Exception
Exception
builtins.BaseException
with_traceback
args
class InvalidBSON(BSONError):
23class InvalidBSON(BSONError):
24    """Raised when trying to create a BSON object from invalid data."""

Raised when trying to create a BSON object from invalid data.

Inherited Members
builtins.Exception
Exception
builtins.BaseException
with_traceback
args
class InvalidStringData(BSONError):
27class InvalidStringData(BSONError):
28    """Raised when trying to encode a string containing non-UTF8 data."""

Raised when trying to encode a string containing non-UTF8 data.

Inherited Members
builtins.Exception
Exception
builtins.BaseException
with_traceback
args
class InvalidDocument(BSONError):
31class InvalidDocument(BSONError):
32    """Raised when trying to create a BSON object from an invalid document."""

Raised when trying to create a BSON object from an invalid document.

Inherited Members
builtins.Exception
Exception
builtins.BaseException
with_traceback
args
class InvalidId(BSONError):
35class InvalidId(BSONError):
36    """Raised when trying to create an ObjectId from invalid data."""

Raised when trying to create an ObjectId from invalid data.

Inherited Members
builtins.Exception
Exception
builtins.BaseException
with_traceback
args