Skip to content

Error Manipulation Opcodes ​

This section documents instructions for creating and inspecting Error objects in CandleVM.

For operand encodings, see the executable format reference.

Errors ​

Opcode byteOpcodeOperand bytesBehavior
61NewErrordestination: register, message: registerRequires an ObjectRef value to a String, creates a custom CandleVM error containing that string, wraps it in an Error and stores the ObjectRef value.
62ErrorTypedestination: register, error: registerRequires an Error and stores the name of its CandleVM error type in a newly allocated String.
63ErrorMessagedestination: register, error: registerRequires an Error and stores its message in a newly allocated String. For custom errors created by NewError, this is the original message; for other CandleVM errors, it is the runtime-generated message.

Built for the Candle ecosystem · Powered by VitePress.