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

IO.raiseError(...) doesn't immediately surface fatal errors #3767

Closed
armanbilge opened this issue Aug 2, 2023 · 4 comments · Fixed by #3811
Closed

IO.raiseError(...) doesn't immediately surface fatal errors #3767

armanbilge opened this issue Aug 2, 2023 · 4 comments · Fixed by #3811

Comments

@armanbilge
Copy link
Member

Consider:

//> using dep "org.typelevel::cats-effect::3.5.1"

import cats.effect.*

object App extends IOApp.Simple:
  def run = IO.raiseError(new VirtualMachineError {}).voidError

Even though a VirtualMachineError is a fatal error, that program completes normally.

If we change it to:

  def run = IO(throw new VirtualMachineError {}).voidError

then the fatal error is surfaced immediately as expected.

h/t @kamilkloch

@scott-thomson239
Copy link
Contributor

Hi, I'd like to help with this if it's not already being worked on

@armanbilge
Copy link
Member Author

@scott-thomson239 thanks! You can target your PR to series/3.5.x branch.

@armanbilge
Copy link
Member Author

@scott-thomson239 are you still working on this one? let us know if you have any questions!

@scott-thomson239
Copy link
Contributor

scott-thomson239 commented Sep 6, 2023

Sorry for my silence on this. I've raised a PR with what I think is the fix now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants