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 json
|
||||||
import signal
|
import signal
|
||||||
import sys
|
import sys
|
||||||
|
import traceback
|
||||||
import urllib.request
|
import urllib.request
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
@ -192,8 +193,9 @@ async def get_essen(only_today: bool) -> None:
|
||||||
var = False
|
var = False
|
||||||
return
|
return
|
||||||
except Exception as expt:
|
except Exception as expt:
|
||||||
await send_status("Es ist ein Fehler aufgetreten:\n%s" % str(expt), ignore_flag=True)
|
await send_status("Es ist ein Fehler aufgetreten:\n[%s] %s" % (sys.exc_info()[0], str(expt)), ignore_flag=True)
|
||||||
print("Fehler:\n%s" % str(expt))
|
print("[%s] Fehler:\n%s" % (datetime.datetime.now().strftime("%Y-%m-%d %H:%M"), traceback.format_exc()),
|
||||||
|
file=sys.stderr)
|
||||||
var = True
|
var = True
|
||||||
return
|
return
|
||||||
data = response.read()
|
data = response.read()
|
||||||
|
|
Loading…
Reference in a new issue