added more details to error message
Signed-off-by: klux2 <k.lux.gm@gmail.com>
This commit is contained in:
parent
1efc6bd383
commit
01248e449e
1 changed files with 4 additions and 2 deletions
|
@ -5,6 +5,7 @@ import datetime
|
|||
import json
|
||||
import signal
|
||||
import sys
|
||||
import traceback
|
||||
import urllib.request
|
||||
import xml.etree.ElementTree as ET
|
||||
from typing import Any
|
||||
|
@ -192,8 +193,9 @@ async def get_essen(only_today: bool) -> None:
|
|||
var = False
|
||||
return
|
||||
except Exception as expt:
|
||||
await send_status("Es ist ein Fehler aufgetreten:\n%s" % str(expt), ignore_flag=True)
|
||||
print("Fehler:\n%s" % str(expt))
|
||||
await send_status("Es ist ein Fehler aufgetreten:\n[%s] %s" % (sys.exc_info()[0], str(expt)), ignore_flag=True)
|
||||
print("[%s] Fehler:\n%s" % (datetime.datetime.now().strftime("%Y-%m-%d %H:%M"), traceback.format_exc()),
|
||||
file=sys.stderr)
|
||||
var = True
|
||||
return
|
||||
data = response.read()
|
||||
|
|
Loading…
Reference in a new issue