Skip to content

Allow overriding how fatal errors are printed #3993

Description

@fredfp

The handling of some uncaught fatal errors can be customized by overriding cats.effect.IOApp.reportFailure.

However, such customization is currently not possible in many cases (all usages of java.lang.Throwable.printStackTrace(), for example here).

Would it be possible to handle similar situations like in the fs2 reactive-streams integration here i.e., by using (if defined) java thread's default UncaughtExceptionHandler?

This would allow one to redirect uncaught errors to a custom logger, so that it gets properly ingested in a logging stack/system.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions