CanThrow (original) (raw)

Scala 3/scala/CanThrow

scala.CanThrow

erased class CanThrow[-E <: Exception] extends Capability

A capability class that allows to throw exception E. When used with the experimental.saferExceptions feature, a throw Ex() expression will require a given of class CanThrow[Ex] to be available.

Attributes

Experimental

true

Source

CanThrow.scala

Graph

Supertypes

trait Capability

class Object

trait Matchable

class Any

In this article

Generated with

Copyright (c) 2002-2025, LAMP/EPFL

Copyright (c) 2002-2025, LAMP/EPFL