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

Gracefully handle exceptions in event listeners #1462

Merged

Conversation

camilojimenez
Copy link

An exception thrown during the handling of an event will stop the execution of other listeners.

Solves #1461

@camilojimenez
Copy link
Author

I would prefer adding some logging, but looking at the file I didn't see how that could be accomplished

@codecov
Copy link

codecov bot commented Jul 3, 2020

Codecov Report

Merging #1462 into master will increase coverage by 0.13%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1462      +/-   ##
==========================================
+ Coverage   81.18%   81.32%   +0.13%     
==========================================
  Files          27       27              
  Lines        2365     2377      +12     
  Branches      365      365              
==========================================
+ Hits         1920     1933      +13     
  Misses        354      354              
+ Partials       91       90       -1     
Impacted Files Coverage Δ
locust/event.py 91.66% <100.00%> (+1.66%) ⬆️
locust/contrib/fasthttp.py 85.44% <0.00%> (-1.52%) ⬇️
locust/clients.py 95.09% <0.00%> (+4.90%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fbfadad...c58b82b. Read the comment docs.

@cyberw cyberw merged commit a69d859 into locustio:master Jul 4, 2020
cyberw added a commit that referenced this pull request Jul 4, 2020
…nstead of importing it into a local variable and changing the copy). Print the whole traceback of the exception.
cyberw added a commit that referenced this pull request Aug 6, 2020
…d in event handlers would also be caught. Re-raise those exceptions.
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

Successfully merging this pull request may close these issues.

2 participants