query
On this page

throwIf

lib.throwIf

Docs pulled from | This Revision | 13 minutes ago


Like throwIfNot, but negated (throw if the first argument is true).

Inputs

cond

1. Function argument

msg

2. Function argument

Type

bool -> string -> a -> a
(lib.trivial.throwIf)

Noogle detected

Aliases

Implementation

The following is the current implementation of this function.

throwIf = cond: msg: if cond then throw msg else x: x;