public < T > Consumer < T > wrap ( Throwing . Consumer < T > consumer ) { return val -> { try { consumer . accept ( val ) ; } catch ( Throwable e ) { handler . accept ( e ) ; } } ; }
Returns a Consumer whose exceptions are handled by this Errors .