mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-04-05 22:45:18 +00:00
change exception-handling
- only error-msg instead of logging.exception - second logging.debug with exec-trace
This commit is contained in:
parent
c32beae4bb
commit
d6b9174112
10 changed files with 132 additions and 61 deletions
|
|
@ -69,6 +69,8 @@ def run(typ,freq,data):
|
|||
except:
|
||||
logging.error("cannot initialize %s-socket", globals.config.get("jsonSocket", "protocol"))
|
||||
logging.debug("cannot initialize %s-socket", globals.config.get("jsonSocket", "protocol"), exc_info=True)
|
||||
# Without connection, plugin couldn't work
|
||||
return
|
||||
|
||||
else:
|
||||
# toDo is equals for all types, so only check if typ is supported
|
||||
|
|
@ -83,13 +85,17 @@ def run(typ,freq,data):
|
|||
except:
|
||||
logging.error("%s to %s failed", typ, globals.config.get("jsonSocket", "protocol"))
|
||||
logging.debug("%s to %s failed", typ, globals.config.get("jsonSocket", "protocol"), exc_info=True)
|
||||
return
|
||||
|
||||
else:
|
||||
logging.warning("Invalid Typ: %s", typ)
|
||||
|
||||
finally:
|
||||
logging.debug("close %s-Connection", globals.config.get("jsonSocket", "protocol"))
|
||||
sock.close()
|
||||
try:
|
||||
sock.close()
|
||||
except:
|
||||
pass
|
||||
|
||||
except:
|
||||
# something very mysterious
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue