CatchingOps

kyo.Result$package.Result.CatchingOps
final class CatchingOps[E <: Throwable](dummy: Unit) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

inline def apply[A](inline expr: => A)(using ClassTag[E]): Result[E, A]

Evaluates an expression, catching a specific exception type.

Evaluates an expression, catching a specific exception type.

Type parameters

A

The type of the successful result

Value parameters

expr

The expression to evaluate

Attributes

Returns

A Result containing either the successful value, a Fail with the caught exception, or a Panic for other exceptions