Implement duk_is_error.
This commit is contained in:
parent
79eed41f2e
commit
4c6593faaf
1 changed files with 8 additions and 0 deletions
|
@ -38,6 +38,14 @@ extern "C" {
|
||||||
message: *const i8) -> duk_idx_t;
|
message: *const i8) -> duk_idx_t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
/// Returns 1 if value at idx inherits from Error, otherwise returns 0. If idx is invalid, also returns 0.
|
||||||
|
pub fn duk_is_error(
|
||||||
|
ctx: *mut duk_context,
|
||||||
|
idx: duk_idx_t
|
||||||
|
) -> duk_bool_t;
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Reference in a new issue