NonLocalReturns

Library implementation of nonlocal return.

Library implementation of nonlocal return.

Usage:

import scala.util.control.NonLocalReturns._

returning { ... throwReturn(x) ... }

class Object
trait Matchable
class Any

Type members

Classlikes

Value members

Concrete methods

def returning[T](op: ReturnThrowable[T] => T): T

Enable nonlocal returns in op.

Enable nonlocal returns in op.

def throwReturn[T](result: T)(using returner: ReturnThrowable[T]): Nothing

Performs a nonlocal return by throwing an exception.

Performs a nonlocal return by throwing an exception.