catch any exception when printing a label
This commit is contained in:
parent
7fe4be4527
commit
6dc447284e
|
@ -210,7 +210,7 @@ def print_labels(request):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
printer.print_labels([(product, quantity)])
|
printer.print_labels([(product, quantity)])
|
||||||
except LabelPrintingError, error:
|
except Exception, error:
|
||||||
return {'error': str(error)}
|
return {'error': str(error)}
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue