Skip to content

traceback.print_last bug. #3

@rfyiamcool

Description

@rfyiamcool

[E 160114 13:15:37 web:1407] Uncaught exception GET /go (127.0.0.1)
HTTPServerRequest(protocol='http', host='127.0.0.1:8002', method='GET', uri='/go', version='HTTP/1.0', remote_ip='127.0.0.1', headers={'Host': '127.0.0.1:8002', 'Accept': '/', 'User-Agent': 'ApacheBench/2.3'})
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/tornado/web.py", line 1332, in _execute
result = method(_self.path_args, *_self.path_kwargs)
File "to.py", line 30, in get
self.blocking_method(self.sleep)
File "/Users/ruifengyun/thread_pool.py", line 109, in res
blocking_warning(fn)
File "/Users/ruifengyun/thread_pool.py", line 96, in blocking_warning
traceback.print_last()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/traceback.py", line 250, in print_last
raise ValueError("no last exception")
ValueError: no last exception

FIX IT.

Replace traceback.print_last() with traceback.print_exc() .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions