progrium/gservice — Issue #19: avoid printing exceptions (traceback.print_exc)
Author: progrium
Created: 2011-11-30 07:45:00+00:00
State: open

In Service start and serve_forever catch all exceptions and call stop. However, we added traceback.print_exc() so that if stop raises, we can see the original exception. It seems like there is a better way to do this. Perhaps an inner try/except? Even though tests pass, we still get nasty, confusing output:

```progrium-twilio:gservice progrium$ python setup.py test
running test
............................Traceback (most recent call last):
File "/Users/progrium/Projects/gservice/gservice/core.py", line 179, in start
ready = self.do_start()
File "/Users/progrium/Projects/gservice/gservice/tests/test_service.py", line 49, in do_start
raise Exception("Error")
Exception: Error
.Traceback (most recent call last):
File "/Users/progrium/Projects/gservice/gservice/core.py", line 181, in start
self._ready_event.wait(self.ready_timeout)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gevent-0.13.3-py2.7-macosx-10.6-x86_64.egg/gevent/event.py", line 74, in wait
result = get_hub().switch()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gevent-0.13.3-py2.7-macosx-10.6-x86_64.egg/gevent/hub.py", line 163, in switch
return greenlet.switch(self)
NotImplementedError: Second Error
...............
----------------------------------------------------------------------
Ran 44 tests in 7.403s

OK
```