/usr/share/pyshared/couchdbkit/exceptions.py is in python-couchdbkit 0.6.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | # -*- coding: utf-8 -
#
# This file is part of couchdbkit released under the MIT license.
# See the NOTICE for more information.
"""
All exceptions used in couchdbkit.
"""
from restkit.errors import ResourceError, RequestFailed
class InvalidAttachment(Exception):
""" raised when an attachment is invalid """
class DuplicatePropertyError(Exception):
""" exception raised when there is a duplicate
property in a model """
class BadValueError(Exception):
""" exception raised when a value can't be validated
or is required """
class MultipleResultsFound(Exception):
""" exception raised when more than one object is
returned by the get_by method"""
class NoResultFound(Exception):
""" exception returned when no results are found """
class ReservedWordError(Exception):
""" exception raised when a reserved word
is used in Document schema """
class DocsPathNotFound(Exception):
""" exception raised when path given for docs isn't found """
class BulkSaveError(Exception):
""" exception raised when bulk save contain errors.
error are saved in `errors` property.
"""
def __init__(self, errors, results, *args):
self.errors = errors
self.results = results
class ViewServerError(Exception):
""" exception raised by view server"""
class MacroError(Exception):
""" exception raised when macro parsiing error in functions """
class DesignerError(Exception):
""" unkown exception raised by the designer """
class ResourceNotFound(ResourceError):
""" Exception raised when resource is not found"""
class ResourceConflict(ResourceError):
""" Exception raised when there is conflict while updating"""
class PreconditionFailed(ResourceError):
""" Exception raised when 412 HTTP error is received in response
to a request """
class DocTypeError(Exception):
""" Exception raised when doc type of json to be wrapped
does not match the doc type of the matching class
"""
|