File: exceptions.py

package info (click to toggle)
libkdumpfile 0.5.4-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,800 kB
  • sloc: ansic: 34,639; sh: 3,853; python: 1,490; makefile: 755
file content (43 lines) | stat: -rw-r--r-- 1,000 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
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env python
# vim:sw=4 ts=4 et

KDUMP_OK           = 0
KDUMP_ERR_SYSTEM   = 1
KDUMP_ERR_NOTIMPL  = 2
KDUMP_ERR_NODATA   = 3
KDUMP_ERR_CORRUPT  = 4
KDUMP_ERR_INVALID  = 5
KDUMP_ERR_EOF      = 6
KDUMP_ERR_NOKEY    = 7
KDUMP_ERR_BUSY     = 8
KDUMP_ERR_ADDRXLAT = 9

class KDumpBaseException(Exception):
    error = None

class OSErrorException(KDumpBaseException):
    error = KDUMP_ERR_SYSTEM

class NotImplementedException(KDumpBaseException):
    error = KDUMP_ERR_NOTIMPL

class NoDataException(KDumpBaseException):
    error = KDUMP_ERR_NODATA

class CorruptException(KDumpBaseException):
    error = KDUMP_ERR_CORRUPT

class InvalidException(KDumpBaseException):
    error = KDUMP_ERR_INVALID

class NoKeyException(KDumpBaseException):
    error = KDUMP_ERR_NOKEY

class EOFException(KDumpBaseException):
    error = KDUMP_ERR_EOF

class BusyException(KDumpBaseException):
    error = KDUMP_ERR_BUSY

class AddressTranslationException(KDumpBaseException):
    error = KDUMP_ERR_ADDRXLAT