Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meaningful output on exception #76

Open
daylanKifky opened this issue Jun 1, 2018 · 3 comments
Open

Meaningful output on exception #76

daylanKifky opened this issue Jun 1, 2018 · 3 comments

Comments

@daylanKifky
Copy link

Would it be possible to get a backtrace or something when an exception is raised from some of the handlers?
At the moment the server just closes the connection silently.
Perhaps just as an optional debugging flag?

@SupraSummus
Copy link

simple workaround:

import logging

def handleMessage(self):
    try:
        do_things()

    except:
        logging.exception('error during handling user data')
        self.close(status=1011, reason='Internal server error')

@dpallot
Copy link
Owner

dpallot commented Feb 7, 2019

Seams reasonable to me, ill look at it.

@benjamingorman
Copy link

Any progress on this? @dpallot Might you accept a PR to implement this? It took me a while to realize that the library was silently discarding exceptions from the handlers - this really shouldn't be the default behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants