mirror of
https://github.com/python-escpos/python-escpos
synced 2025-12-02 09:43:30 +00:00
Make BarcodeSizeError and BarcodeTypeError display the erroneous value
(MUCH more helpful for debugging)
This commit is contained in:
committed by
Patrick Kanzler
parent
f7a2caee72
commit
e988873999
@@ -45,7 +45,7 @@ class BarcodeTypeError(Error):
|
||||
self.resultcode = 10
|
||||
|
||||
def __str__(self):
|
||||
return "No Barcode type is defined"
|
||||
return "No Barcode type is defined (%s)" % self.msg
|
||||
|
||||
|
||||
class BarcodeSizeError(Error):
|
||||
@@ -61,7 +61,7 @@ class BarcodeSizeError(Error):
|
||||
self.resultcode = 20
|
||||
|
||||
def __str__(self):
|
||||
return "Barcode size is out of range"
|
||||
return "Barcode size is out of range (%s)" % self.msg
|
||||
|
||||
|
||||
class BarcodeCodeError(Error):
|
||||
|
||||
Reference in New Issue
Block a user