From bdcec99e2971c23095ef991b81a3cf81a5d8832c Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 20 Oct 2014 11:32:04 -0400 Subject: display stack traces with exceptions --- termcast_server/__init__.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'termcast_server/__init__.py') diff --git a/termcast_server/__init__.py b/termcast_server/__init__.py index ca6adc0..de2af21 100644 --- a/termcast_server/__init__.py +++ b/termcast_server/__init__.py @@ -2,6 +2,7 @@ import signal import socket import sys import threading +import traceback import uuid from . import pubsub @@ -69,6 +70,7 @@ class Server(object): sock.listen(100) client, addr = sock.accept() except Exception as e: + print(traceback.format_exc()) print('*** Listen/accept failed: ' + str(e)) continue @@ -81,6 +83,7 @@ class Server(object): try: connection.run() except Exception as e: + print(traceback.format_exc()) print('Running connection failed: ' + str(e)) self.publisher.unsubscribe(connection) client.close() -- cgit v1.2.3-54-g00ecf