Commit 235c53f1 authored by Guillaume Seguin's avatar Guillaume Seguin

Report more exceptions in printcore callbacks

parent 1c76c26c
...@@ -112,7 +112,7 @@ class printcore(): ...@@ -112,7 +112,7 @@ class printcore():
def logError(self, error): def logError(self, error):
if self.errorcb: if self.errorcb:
try: self.errorcb(error) try: self.errorcb(error)
except: pass except: traceback.print_exc()
else: else:
logging.error(error) logging.error(error)
...@@ -223,7 +223,7 @@ class printcore(): ...@@ -223,7 +223,7 @@ class printcore():
self.log.append(line) self.log.append(line)
if self.recvcb: if self.recvcb:
try: self.recvcb(line) try: self.recvcb(line)
except: pass except: traceback.print_exc()
if self.loud: logging.info("RECV: %s" % line.rstrip()) if self.loud: logging.info("RECV: %s" % line.rstrip())
return line return line
except SelectError as e: except SelectError as e:
...@@ -279,7 +279,7 @@ class printcore(): ...@@ -279,7 +279,7 @@ class printcore():
or line.startswith('ok') or "T:" in line: or line.startswith('ok') or "T:" in line:
if self.onlinecb: if self.onlinecb:
try: self.onlinecb() try: self.onlinecb()
except: pass except: traceback.print_exc()
self.online = True self.online = True
return return
...@@ -300,7 +300,7 @@ class printcore(): ...@@ -300,7 +300,7 @@ class printcore():
if line.startswith('ok') and "T:" in line and self.tempcb: if line.startswith('ok') and "T:" in line and self.tempcb:
#callback for temp, status, whatever #callback for temp, status, whatever
try: self.tempcb(line) try: self.tempcb(line)
except: pass except: traceback.print_exc()
elif line.startswith('Error'): elif line.startswith('Error'):
self.logError(line) self.logError(line)
# Teststrings for resend parsing # Firmware exp. result # Teststrings for resend parsing # Firmware exp. result
...@@ -395,7 +395,7 @@ class printcore(): ...@@ -395,7 +395,7 @@ class printcore():
try: try:
self.print_thread.join() self.print_thread.join()
except: except:
pass traceback.print_exc()
self.print_thread = None self.print_thread = None
...@@ -578,7 +578,7 @@ class printcore(): ...@@ -578,7 +578,7 @@ class printcore():
logging.info("SENT: %s" % command) logging.info("SENT: %s" % command)
if self.sendcb: if self.sendcb:
try: self.sendcb(command, gline) try: self.sendcb(command, gline)
except: pass except: traceback.print_exc()
try: try:
self.printer.write(str(command + "\n")) self.printer.write(str(command + "\n"))
if self.printer_tcp: if self.printer_tcp:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment