Try
Library of error handling functions.
Functions
IsError
Checks whether a value is an error.
Syntax:
Try.IsError(value: anything)
Parameters
value
: The value to check.
Example:
let x: string = "hi" in Try.IsError(x) // false
let x: int = Error.Build("failure!") in Try.IsError(x) // true
IsSuccess
Checks whether a value is not an error.
Syntax:
Try.IsSuccess(value: anything)
Parameters
value
: The value to check.
Example:
let x: string = "hi" in Try.IsSuccess(x) // true
let x: int = Error.Build("failure!") in Try.IsSuccess(x) // false