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

Catch more exceptions thrown from IO in TopLevel #1197

Open
atomb opened this issue Apr 19, 2021 · 1 comment
Open

Catch more exceptions thrown from IO in TopLevel #1197

atomb opened this issue Apr 19, 2021 · 1 comment
Assignees
Labels
tech debt Issues that document or involve technical debt topics: error-handling Issues involving the way SAW responds to an error condition type: enhancement Issues describing an improvement to an existing feature or capability
Milestone

Comments

@atomb
Copy link
Contributor

atomb commented Apr 19, 2021

As part of fixing #678 (in PR #1194), I adapted the io function in SAWScript.Value to explicitly handle a couple of exception types. This might be a good place to consolidate handling of exceptions we expect may be thrown by IO code. Doing so might be as simple as changing a bunch of liftIO calls in TopLevel functions to io and extending the list of exceptions we have explicit handlers for.

@atomb atomb changed the title Catching exceptions thrown from IO in TopLevel Catch more exceptions thrown from IO in TopLevel Apr 19, 2021
@robdockins robdockins added the tech debt Issues that document or involve technical debt label Apr 23, 2021
@brianhuffman brianhuffman added the topics: error-handling Issues involving the way SAW responds to an error condition label May 7, 2021
@sauclovian-g sauclovian-g self-assigned this Oct 30, 2024
@sauclovian-g sauclovian-g added this to the 2025T1 milestone Oct 30, 2024
@sauclovian-g
Copy link
Contributor

SAW code should not throw random exceptions from I/O; it should use the upcoming uniform SAW error apparatus. So this should be limited to things we expect to arrive from elsewhere.

Also note that these days that io is the same as liftIO.

@sauclovian-g sauclovian-g added the type: enhancement Issues describing an improvement to an existing feature or capability label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech debt Issues that document or involve technical debt topics: error-handling Issues involving the way SAW responds to an error condition type: enhancement Issues describing an improvement to an existing feature or capability
Projects
None yet
Development

No branches or pull requests

4 participants