KeyNotFound
eff KeyNotFoundSourceIndicates that a key was not found.
Useful for instances of Index or IndexMut.
Operations
def keyNotFound(msg: String): Void \ KeyNotFound
SourceStops execution with an error message.
Definitions
@Experimental def handleWithResult(f: a -> b \ ef): a -> Result[String, b] \ ef - KeyNotFound
SourceHandles the KeyNotFound effect of the given function f by converting
key-not-found errors to Result values.
Returns Ok(f(x)) if the computation completes successfully.
Returns Err(msg) if the computation raises keyNotFound(msg).
@Experimental def runWithResult(f: Unit -> a \ ef): Result[String, a] \ ef - KeyNotFound
SourceRuns the KeyNotFound effect of the given function f.
Returns Ok(f()) if the computation completes successfully.
Returns Err(msg) if the computation raises keyNotFound(msg).