From 1440dc1c96a6379d7917b808b50eb415b161cc4b Mon Sep 17 00:00:00 2001 From: Joren Van Onder Date: Wed, 16 Sep 2015 14:54:26 +0200 Subject: [PATCH] [IMP] hw_escpos: don't replace a USBError exception with some string There's absolutely no point to hiding exceptions like this, it makes debugging more difficult than it has to be. --- addons/hw_escpos/escpos/exceptions.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/hw_escpos/escpos/exceptions.py b/addons/hw_escpos/escpos/exceptions.py index 51d860f1368..1bec14d5e00 100644 --- a/addons/hw_escpos/escpos/exceptions.py +++ b/addons/hw_escpos/escpos/exceptions.py @@ -86,7 +86,7 @@ class NoStatusError(Error): self.resultcode = 70 def __str__(self): - return "Impossible to get status from the printer" + return "Impossible to get status from the printer: " + str(self.msg) class TicketNotPrinted(Error): def __init__(self, msg=""): @@ -95,7 +95,7 @@ class TicketNotPrinted(Error): self.resultcode = 80 def __str__(self): - return "A part of the ticket was not been printed" + return "A part of the ticket was not been printed: " + str(self.msg) class NoDeviceError(Error): def __init__(self, msg=""): @@ -104,7 +104,7 @@ class NoDeviceError(Error): self.resultcode = 90 def __str__(self): - return "Impossible to find the printer Device" + return str(self.msg) class HandleDeviceError(Error): def __init__(self, msg=""): @@ -113,4 +113,4 @@ class HandleDeviceError(Error): self.resultcode = 100 def __str__(self): - return "Impossible to handle device" + return str(self.msg)