# try_call_result · Rell standard library · Chromia Docs (concept)

> type try_ call_ result<T> Type representing the result of a function call that may have thrown a require exception. Constructed by calling try_call_catch()

Source: https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/try_call_result/

TYPE

# try\_call\_result

```signature
type try_call_result<T>
```

Type representing the result of a function call that may have thrown a `require` exception.

Constructed by calling `try_call_catch()`. Contains either a value of type `T` or error information.

Use `is_error` to check if the call failed, `value` to get the value (if the call succeeded),
`value_or_null` to get the value or null (if the call failed), or `require_message_or_null` to get
the error message (if the call failed) or null (if the call succeeded).

Since 0.14.16

## Attributes

`is_error: boolean`
:   Check if this result represents an error.

    Since 0.14.16

`value: T`
:   Get the value contained in this result.

    **Throws**

    * `exception` — if the function call threw a `require` exception

    Since 0.14.16

`value_or_null: T?`
:   Get the value contained in this result or null if this result represents an error.

    Since 0.14.16

`require_message_or_null: text?`
:   Get the error message from the `require` exception that was thrown by the function call,
    or null if the function call did not throw an exception.

    Since 0.14.16

[View this page on docs.chromia.com](https://docs.chromia.com/pages/rell-stdlib/-rell%20-system%20-library/%5Broot%5D/try_call_result/index.html)Generated API reference, mirrored from the live docs
