soroban_env_host

Macro err

Source
macro_rules! err {
    ($host:expr, $error:expr, $msg:literal, $($args:expr),*) => { ... };
}
Expand description

Helper for building multi-argument errors. For example:

err!(host, error, "message", arg1, arg2);

All arguments must be convertible to Val with [TryIntoVal]. This is expected to be called from within a function that returns Result<_, HostError>. If these requirements can’t be fulfilled, use the Host::error function directly.