Syntax Lookup

Enter some language construct you want to know more about.
This is the exception syntax.

Use exception to declare custom exception constructors.

Example

ReScriptJS Output
exception NotFound(string)

let message = try {
  throw(NotFound("Missing value"))
} catch {
| NotFound(text) => text
}

References