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.



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

def initialize(code)
  @code = code
end

Instance Attribute Details

#codeInteger (readonly)

Returns The system exit code.

Returns:

  • (Integer)

    The system exit code.



34
35
36
# File 'lib/wasmtime/error.rb', line 34

def code
  @code
end

Instance Method Details

#messageString

Returns:

  • (String)


41
42
43
# File 'lib/wasmtime/error.rb', line 41

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