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.
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.