Changeset b01b6d1 for server/lib/gutenbach/server/errors.py
- Timestamp:
- Jan 11, 2012, 12:51:51 AM (12 years ago)
- Branches:
- no-cups
- Children:
- be6ff03
- Parents:
- ffbe41d
- git-author:
- Jessica B. Hamrick <jhamrick@…> (01/11/12 00:51:51)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (01/11/12 00:51:51)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/lib/gutenbach/server/errors.py
re58af05 rb01b6d1 1 1 __all__ = [ 2 2 'InvalidJobException', 3 'InvalidPrinterStateException' 3 'InvalidPrinterStateException', 4 'InvalidJobStateException', 4 5 ] 5 6 … … 7 8 def __init__(self, jobid): 8 9 self.jobid = jobid 9 10 10 def __str__(self): 11 return "Job with id '%d' does not exist!" % self.jobid11 return "Job does not exist: %d" % self.jobid 12 12 13 13 class InvalidPrinterStateException(Exception): 14 def __init__(self, message): 15 self.message = message 14 def __init__(self, state): 15 self.state = hex(state) 16 def __str__(self): 17 return "Invalid printer state: %s" % self.state 16 18 19 class InvalidJobStateException(Exception): 20 def __init__(self, state): 21 self.state = hex(state) 17 22 def __str__(self): 18 return self.message23 return "Invalid job state: %s" % self.state
Note: See TracChangeset
for help on using the changeset viewer.