when verbose logging is enabled, print a traceback of possibly raised exceptions
This commit is contained in:
parent
b6e969d267
commit
c6d69b231b
1 changed files with 3 additions and 0 deletions
|
@ -1581,6 +1581,9 @@ values set via the --border option.
|
||||||
args.without_pdfrw, outputstream=args.output)
|
args.without_pdfrw, outputstream=args.output)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error("error: " + str(e))
|
logging.error("error: " + str(e))
|
||||||
|
if logging.getLogger().isEnabledFor(logging.DEBUG):
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc(file=sys.stderr)
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in a new issue