Skip to content

getExitStatusCode

getExitStatusCode(err): number

Defined in: packages/runtime/src/wasm/exit-status.ts:56

Extract the numeric exit code from an Emscripten ExitStatus value.

Pairs with isExitStatus — call after isExitStatus(err) returns true. Falls back to 1 for the legacy string-message form that does not carry a status field.

unknown

A value for which isExitStatus returned true.

number

The program’s exit code, or 1 if no numeric status is present.

isExitStatus