WasiExitException Class
Thrown by the proc_exit function of WASI: it ends the execution of the module, and is thrown by the call into WebAssembly. WasiContext.Run catches it and returns WasiExitException.ExitCode.
public sealed class WasiExitException : Exception- Inheritance
ExceptionWasiExitException
Constructors
| Name | Description |
|---|---|
| WasiExitException() | Initializes a new instance of the WasiExitException class whose exit code is 0. |
| WasiExitException(int) | Initializes a new instance of the WasiExitException class. |
| WasiExitException(string) | Initializes a new instance of the WasiExitException class whose exit code is 1. |
| WasiExitException(string, Exception?) | Initializes a new instance of the WasiExitException class whose exit code is 1. |
WasiExitException overloads
WasiExitException()
WasiExceptions.csInitializes a new instance of the WasiExitException class whose exit code is 0.
public WasiExitException()WasiExitException(int)
WasiExceptions.csInitializes a new instance of the WasiExitException class.
public WasiExitException(int exitCode)Parameters
exitCodeint- The exit code of the module.
WasiExitException(string)
WasiExceptions.csInitializes a new instance of the WasiExitException class whose exit code is 1.
public WasiExitException(string message)Parameters
messagestring- The message of the exception.
WasiExitException(string, Exception?)
WasiExceptions.csInitializes a new instance of the WasiExitException class whose exit code is 1.
Parameters
messagestring- The message of the exception.
innerExceptionException?- The exception that caused the exit.
Properties
| Name | Description |
|---|---|
| ExitCode | Gets the exit code of the module. |