1
0
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:
Stephan Sokolow
2014-05-22 00:47:08 -04:00
committed by Patrick Kanzler
parent f7a2caee72
commit e988873999
2 changed files with 5 additions and 5 deletions

View File

@@ -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):