Skip to content

Result with Exceptions #21

@sideeffffect

Description

@sideeffffect

Hello, would you consider restricting Result[+T, +E] to Result[+T, +E <: Exception]?
If something is a result, the Err case should communicate some information about what went wrong. And Exceptions are the way to do that in Scala: Exceptions can be chained with causality relation and also contain stack traces. Plus have other advantages, like interop with Java and related tooling and can be (re)thrown and caught.

Generally speaking, using Exception for things like Result is the best practice within the wider software engineering Scala world, so it would be nice if steps/Result nudged its users in the right direction.

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