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

Add timeout for generating values #373

Closed
FWDekker opened this issue May 18, 2021 · 0 comments · Fixed by #376
Closed

Add timeout for generating values #373

FWDekker opened this issue May 18, 2021 · 0 comments · Fixed by #376
Assignees
Labels
enhancement Improvement of existing feature

Comments

@FWDekker
Copy link
Owner

If a value takes too long to generate, say more than 5 seconds, then the generator should be interrupted and an exception should be thrown (and caught to show to the user properly).

This should prevent users from accidentally freezing their IDE when they, say, generate an array of 9999 elements or a string of 14616742 characters (or both).

@FWDekker FWDekker added the enhancement Improvement of existing feature label May 18, 2021
@FWDekker FWDekker self-assigned this May 18, 2021
FWDekker added a commit that referenced this issue May 24, 2021
FWDekker added a commit that referenced this issue Aug 2, 2021
The additional information was introduced by accident in #376 when implementing #373 to add a timeout for generating values. Error messages in the preview (and other places) would contain the full name of the exception that caused the error, which is completely unnecessary.

This fix was originally implemented in the `uds` branch, but I decided to add a "backports" branch for fixes I might want to release in a v2.x.x release before releasing v3.0.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant