Skip to content

loggedErr

loggedErr(code, options?): never

Defined in: util.ts:85

Logs a formatted ARC-65 error message and immediately fails the transaction.

Equivalent to loggedAssert(false, code, {message, prefix}).

The logged output follows the format {prefix}:{code} or {prefix}:{code}:{message} and is compatible with ARC-56 and ARC-32 clients.

Note that this will generate extra bytecode, so it is strongly advised to keep your messages and error codes short.

string

An error code. Must not contain :. Should be alphanumeric.

An optional object containing the message and prefix for the error.

string

Message appended after the code. Must not contain :. Defaults to no message.

"ERR" | "AER"

Error prefix, either "ERR" or "AER". Defaults to "ERR".

never

loggedErr(code, message): never

Defined in: util.ts:100

Logs a formatted ARC-65 error message and immediately fails the transaction.

Equivalent to loggedAssert(false, code, {message, prefix}).

The logged output follows the format ERR:{code}:{message} and is compatible with ARC-56 and ARC-32 clients.

Note that this will generate extra bytecode, so it is strongly advised to keep your messages and error codes short.

string

An error code. Must not contain :. Should be alphanumeric.

string

Message appended after the code. Must not contain :.

never