Skip to content

BytecodeError

Raised when bytes are not valid Do bytecode.

load and run raise it before any of the bytecode runs, so a caller can recompile and retry without repeating side effects. A program that loads other bytecode can also raise it while running.

Example

try
  load b"not bytecode"
catch BytecodeError: err
  echo "invalid bytecode: $err"

Inherits from: std.DataError