File: OutputDeviceError.py

package info (click to toggle)
uranium 5.0.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,304 kB
  • sloc: python: 31,765; sh: 132; makefile: 12
file content (31 lines) | stat: -rw-r--r-- 820 bytes parent folder | download | duplicates (3)
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
# Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the LGPLv3 or higher.


class WriteRequestFailedError(Exception):
    """Base class for error raised by OutputDevice::requestWrite()

    This class serves as a base class for more specialized errors raised
    by OutputDevice::requestWrite(). Additionally, it can be raised whenever
    an error occurs for which no specialized error is available.
    """

    pass


class UserCanceledError(WriteRequestFailedError):
    """The user canceled the operation."""

    pass


class PermissionDeniedError(WriteRequestFailedError):
    """Permission was denied when trying to write to the device."""

    pass


class DeviceBusyError(WriteRequestFailedError):
    """The device is busy and cannot accept write requests at the moment."""

    pass