mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-28 11:25:23 +02:00
jw.pkg.lib: Don't log {e}
Don't log an Exception as {e} but as str(e) producing nicer output.
Or as repr(e) if a backtrace is requested, because to people who can
read backtraces, type info might be of interest. Also, remove
pointless time stamps, those belong into the logging framework.
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
78d49edfeb
commit
7eb15f2477
3 changed files with 5 additions and 11 deletions
|
|
@ -116,10 +116,7 @@ class App: # export
|
|||
try:
|
||||
ret = await self._run(self.__args)
|
||||
except Exception as e:
|
||||
if hasattr(e, 'message'):
|
||||
log(ERR, e.message)
|
||||
else:
|
||||
log(ERR, f'Exception: {type(e)}: {e}')
|
||||
log(ERR, repr(e) if self.__back_trace else str(e))
|
||||
exit_status = 1
|
||||
if self.__back_trace:
|
||||
raise
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue