Skip to main content

SOME_ERROR

Constant SOME_ERROR 

Source
pub const SOME_ERROR: i32 = NO_MEM_EXPORTED; // -14i32
Expand description

Stand-in for “the host returned some error”, for tests that assert an error propagates rather than any particular code. The value is arbitrary; it only has to be a real host code the stdlib never constructs itself, so a passing test can’t be explained by the code under test producing it independently. FIELD_NOT_FOUND cannot be used — the optional getters turn it into Ok(None).