Ignore:
Timestamp:
Dec 23, 2011, 8:20:29 PM (12 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
Branches:
no-cups
Children:
b828a96
Parents:
f6e2532
git-author:
Jessica B. Hamrick <jhamrick@…> (12/23/11 20:20:29)
git-committer:
Jessica B. Hamrick <jhamrick@…> (12/23/11 20:20:29)
Message:

Checkpoint, creating classes for specific IPP attributes

File:
1 moved

Legend:

Unmodified
Added
Removed
  • server/lib/gutenbach/ipp/errors.py

    rf6c6897 raded2d1  
    22
    33class IPPException(Exception):
    4     def __init__(self, message):
     4    def __init__(self, message=""):
    55        self.message = message
    66
     
    2424### Client error codes
    2525
    26 class BadRequest(IPPClientException):
     26class ClientErrorBadRequest(IPPClientException):
    2727    ipp_error_code = ErrorCodes.BAD_REQUEST
    2828
    29 class Forbidden(IPPClientException):
     29class ClientErrorForbidden(IPPClientException):
    3030    ipp_error_code = ErrorCodes.FORBIDDEN
    3131
    32 class NotAuthenticated(IPPClientException):
     32class ClientErrorNotAuthenticated(IPPClientException):
    3333    ipp_error_code = ErrorCodes.NOT_AUTHENTICATED
    3434
    35 class NotAuthorized(IPPClientException):
     35class ClientErrorNotAuthorized(IPPClientException):
    3636    ipp_error_code = ErrorCodes.NOT_AUTHORIZED
    3737
    38 class NotPossible(IPPClientException):
     38class ClientErrorNotPossible(IPPClientException):
    3939    ipp_error_code = ErrorCodes.NOT_POSSIBLE
    4040
    41 class Timeout(IPPClientException):
     41class ClientErrorTimeout(IPPClientException):
    4242    ipp_error_code = ErrorCodes.TIMEOUT
    4343
    44 class NotFound(IPPClientException):
     44class ClientErrorNotFound(IPPClientException):
    4545    ipp_error_code = ErrorCodes.NOT_FOUND
    4646
    47 class Gone(IPPClientException):
     47class ClientErrorGone(IPPClientException):
    4848    ipp_error_code = ErrorCodes.GONE
    4949
    50 class RequestEntity(IPPClientException):
     50class ClientErrorRequestEntity(IPPClientException):
    5151    ipp_error_code = ErrorCodes.REQUEST_ENTITY
    5252
    53 class RequestValue(IPPClientException):
     53class ClientErrorRequestValue(IPPClientException):
    5454    ipp_error_code = ErrorCodes.REQUEST_VALUE
    5555
    56 class DocumentFormatNotSupported(IPPClientException):
     56class ClientErrorDocumentFormatNotSupported(IPPClientException):
    5757    ipp_error_code = ErrorCodes.DOCUMENT_FORMAT
    5858
    59 class Attributes(IPPClientException):
     59class ClientErrorAttributes(IPPClientException):
    6060    ipp_error_code = ErrorCodes.ATTRIBUTES
    6161
     
    6767        pass
    6868
    69 class UriSchemeNotSupported(IPPClientException):
     69class ClientErrorUriSchemeNotSupported(IPPClientException):
    7070    ipp_error_code = ErrorCodes.URI_SCHEME
    7171
    72 class CharsetNotSupported(IPPClientException):
     72class ClientErrorCharsetNotSupported(IPPClientException):
    7373    ipp_error_code = ErrorCodes.CHARSET
    7474
    75 class Conflict(IPPClientException):
     75class ClientErrorConflict(IPPClientException):
    7676    ipp_error_code = ErrorCodes.CONFLICT
    7777
    78 class CompressionNotSupported(IPPClientException):
     78class ClientErrorCompressionNotSupported(IPPClientException):
    7979    ipp_error_code = ErrorCodes.COMPRESSION_NOT_SUPPORTED
    8080
    81 class CompressionError(IPPClientException):
     81class ClientErrorCompressionError(IPPClientException):
    8282    ipp_error_code = ErrorCodes.COMPRESSION_ERROR
    8383
    84 class DocumentFormatError(IPPClientException):
     84class ClientErrorDocumentFormatError(IPPClientException):
    8585    ipp_error_code = ErrorCodes.DOCUMENT_FORMAT_ERROR
    8686
    87 class DocumentAccessError(IPPClientException):
     87class ClientErrorDocumentAccessError(IPPClientException):
    8888    ipp_error_code = ErrorCodes.DOCUMENT_ACCESS_ERROR
    8989
    90 class AttributesNotSettable(IPPClientException):
     90class ClientErrorAttributesNotSettable(IPPClientException):
    9191    ipp_error_code = ErrorCodes.ATTRIBUTES_NOT_SETTABLE
    9292
    93 class IgnoredAllSubscriptions(IPPClientException):
     93class ClientErrorIgnoredAllSubscriptions(IPPClientException):
    9494    ipp_error_code = ErrorCodes.IGNORED_ALL_SUBSCRIPTIONS
    9595
    96 class TooManySubscriptions(IPPClientException):
     96class ClientErrorTooManySubscriptions(IPPClientException):
    9797    ipp_error_code = ErrorCodes.TOO_MANY_SUBSCRIPTIONS
    9898
    99 class IgnoredAllNotifications(IPPClientException):
     99class ClientErrorIgnoredAllNotifications(IPPClientException):
    100100    ipp_error_code = ErrorCodes.IGNORED_ALL_NOTIFICATIONS
    101101
    102 class PrintSupportFileNotFound(IPPClientException):
     102class ClientErrorPrintSupportFileNotFound(IPPClientException):
    103103    ipp_error_code = ErrorCodes.PRINT_SUPPORT_FILE_NOT_FOUND
    104104
    105105### Server error codes
    106106
    107 class InternalError(IPPServerException):
     107class ServerErrorInternalError(IPPServerException):
    108108    ipp_error_code = ErrorCodes.INTERNAL_ERROR
    109109
    110 class OperationNotSupported(IPPServerException):
     110class ServerErrorOperationNotSupported(IPPServerException):
    111111    ipp_error_code = ErrorCodes.OPERATION_NOT_SUPPORTED
    112112
    113 class ServiceUnavailable(IPPServerException):
     113class ServerErrorServiceUnavailable(IPPServerException):
    114114    ipp_error_code = ErrorCodes.SERVICE_UNAVAILABLE
    115115
    116 class VersionNotSupported(IPPServerException):
     116class ServerErrorVersionNotSupported(IPPServerException):
    117117    ipp_error_code = ErrorCodes.VERSION_NOT_SUPPORTED
    118118
    119 class DeviceError(IPPServerException):
     119class ServerErrorDeviceError(IPPServerException):
    120120    ipp_error_code = ErrorCodes.DEVICE_ERROR
    121121
    122 class TemporaryError(IPPServerException):
     122class ServerErrorTemporaryError(IPPServerException):
    123123    ipp_error_code = ErrorCodes.TEMPORARY_ERROR
    124124
    125 class NotAccepting(IPPServerException):
     125class ServerErrorNotAccepting(IPPServerException):
    126126    ipp_error_code = ErrorCodes.NOT_ACCEPTING
    127127
    128 class PrinterBusy(IPPServerException):
     128class ServerErrorPrinterBusy(IPPServerException):
    129129    ipp_error_code = ErrorCodes.PRINTER_BUSY
    130130
    131 class ErrorJobCancelled(IPPServerException):
     131class ServerErrorErrorJobCancelled(IPPServerException):
    132132    ipp_error_code = ErrorCodes.ERROR_JOB_CANCELLED
    133133
    134 class MultipleJobsNotSupported(IPPServerException):
     134class ServerErrorMultipleJobsNotSupported(IPPServerException):
    135135    ipp_error_code = ErrorCodes.MULTIPLE_JOBS_NOT_SUPPORTED
    136136
    137 class PrinterIsDeactivated(IPPServerException):
     137class ServerErrorPrinterIsDeactivated(IPPServerException):
    138138    ipp_error_code = ErrorCodes.PRINTER_IS_DEACTIVATED
Note: See TracChangeset for help on using the changeset viewer.