Exception: Wasmtime::WasiExit

Inherits:
Error
  • Object
show all
Defined in:
lib/wasmtime/error.rb

Overview

Raised when a WASI program terminates early by calling exit.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code) ⇒ WasiExit

Returns a new instance of WasiExit.



39
40
41
# File 'lib/wasmtime/error.rb', line 39

def initialize(code)
  @code = code
end

Instance Attribute Details

#codeInteger (readonly)

Returns The system exit code.

Returns:

  • (Integer)

    The system exit code.



37
38
39
# File 'lib/wasmtime/error.rb', line 37

def code
  @code
end

Instance Method Details

#messageString

Returns:

  • (String)


44
45
46
# File 'lib/wasmtime/error.rb', line 44

def message
  "WASI exit with code #{code}"
end