Skip to content

Commit

Permalink
Followup on #1462 Actually change log.unhandled_greenlet_exception (i…
Browse files Browse the repository at this point in the history
…nstead of importing it into a local variable and changing the copy). Print the whole traceback of the exception.
  • Loading branch information
cyberw committed Jul 4, 2020
1 parent a69d859 commit 8c8d5f8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions locust/event.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging
from .log import unhandled_greenlet_exception
from . import log
import traceback

class EventHook(object):
"""
Expand Down Expand Up @@ -36,8 +37,8 @@ def fire(self, *, reverse=False, **kwargs):
try:
handler(**kwargs)
except Exception as e:
logging.error("Uncaught exception in event handler: %s", e)
unhandled_greenlet_exception = True
logging.error("Uncaught exception in event handler: \n%s", traceback.format_exc())
log.unhandled_greenlet_exception = True


class Events:
Expand Down

0 comments on commit 8c8d5f8

Please sign in to comment.