print errors

This commit is contained in:
2026-03-21 21:13:25 +01:00
parent 4f8a6d1df1
commit 0c90d883ce
+6 -2
View File
@@ -333,14 +333,18 @@ def run_server():
resp = process_command(tef, data, state, conn)
if resp: conn.sendall(resp)
except Exception as e:
try: conn.sendall(b"!" + str(e).encode() + b"\n")
try:
print(e)
conn.sendall(b"!" + str(e).encode() + b"\n")
except Exception: pass
except ConnectionResetError: break
except ConnectionAbortedError: break
except BlockingIOError:
try: run_periodic(tef, conn, state)
except Exception as e:
try: conn.sendall(b"!" + str(e).encode() + b"\n")
try:
print(e)
conn.sendall(b"!" + str(e).encode() + b"\n")
except Exception: pass
time.sleep(0.03)