/** * Recovers from all errors. * * @tsplus static effect/core/io/Layer.Aspects catchAll * @tsplus pipeable effect/core/io/Layer catchAll */ export function catchAll( handler: (e: E) => Layer ) { return (self: Layer): Layer => self.foldLayer(handler, (env) => Layer.succeedEnvironment(env)) }