Skip to content

Conversation

@berriesyl
Copy link
Contributor

Describe your changes

Checklist

  • I have read the [CONTRIBUTING]
  • I have performed a self-review of my own code
  • I have run the code locally and it works as expected
  • I have commented my code, particularly in hard-to-understand areas

Screenshots (if appropriate)

Copy link
Owner

@canbula canbula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we return False in __exit__?

@berriesyl
Copy link
Contributor Author

berriesyl commented Nov 12, 2024

I use the exc_type, exc_value, and traceback parameters in the ```__exit__´´´ function for debugging purposes. By returning False, I prevent the suppression of any errors that occur during the execution of the timed function, allowing the error to be passed outward. This way, if an error occurs, I can access these parameters and handle the error appropriately within the try-except block.

Copy link
Owner

@canbula canbula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@canbula canbula merged commit eb605a9 into canbula:master Dec 11, 2024
1 check passed
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