-
Notifications
You must be signed in to change notification settings - Fork 31
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
Tests for exception
stdlib.
#480
Labels
Comments
The resulting tests should probably go to |
jiribenes
pushed a commit
that referenced
this issue
Jan 15, 2025
## Motivation Resolves #480 This module demonstrates exception handling combinators in Effekt using a simple, focused example. By showcasing custom exception handling (`TestException`) with different strategies (default handling, ignoring, reporting, finalizing), it provides a practical guide for understanding these features. ## Changes - Introduced `TestException` as a custom exception type, independent of other exceptions like `OutOfBounds`. - Added `generalOperation`, which raises a `TestException` for invalid input or returns a string. - Included tests for handling exceptions with: - Default behavior - Ignoring exceptions - Reporting exceptions - Finalization hooks - "Reifying" with Results ## Testing The examples are self-contained in the `main` function, covering all provided exception-handling strategies. Each approach is tested and outputs expected results for validation (`combinators.check`).
github-project-automation
bot
moved this from Todo
to Done
in Effekt Hackathon 02.10.2024
Jan 15, 2025
EveEme
pushed a commit
to EveEme/effekt
that referenced
this issue
Jan 20, 2025
## Motivation Resolves effekt-lang#480 This module demonstrates exception handling combinators in Effekt using a simple, focused example. By showcasing custom exception handling (`TestException`) with different strategies (default handling, ignoring, reporting, finalizing), it provides a practical guide for understanding these features. ## Changes - Introduced `TestException` as a custom exception type, independent of other exceptions like `OutOfBounds`. - Added `generalOperation`, which raises a `TestException` for invalid input or returns a string. - Included tests for handling exceptions with: - Default behavior - Ignoring exceptions - Reporting exceptions - Finalization hooks - "Reifying" with Results ## Testing The examples are self-contained in the `main` function, covering all provided exception-handling strategies. Each approach is tested and outputs expected results for validation (`combinators.check`).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
There are currently no tests for the
exception
part of the stdlib.(As noticed in #479).
The text was updated successfully, but these errors were encountered: