Skip to content

Handle creates a black-box when Submarine escapes rescue #648

Description

@morgen-peschke

Code using Handle.allow has to be very careful that none of the code it calls inside of it uses ApplicativeError or MonadError to modify thrown exceptions between when it is created using Raise and when Handle catches and unwraps the Submarine.

If this does happen to happen, the resulting error does not contain any information about the enclosed exception (it's toString is "cats.mtl.Handle$Submarine"), making debugging quite difficult.

Can Submarine be updated to include the wrapped error as it's cause or have some other change so that it'll show in the toString output?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions