diff options
author | Zoltan Herczeg <zherczeg.u-szeged@partner.samsung.com> | 2018-01-30 01:13:44 +0100 |
---|---|---|
committer | yichoi <duddlf.choi@samsung.com> | 2018-01-30 09:13:44 +0900 |
commit | 918eb22a019e7d888c37e85798faba6ed3e0e9cf (patch) | |
tree | 9c5d59cf64265a24416002e25583c64cbbaed7d8 /docs | |
parent | b548eae4ad45b5f1000578d573433c90af5a3c2c (diff) |
Add support for aborts. (#2176)
Aborts are similar to exceptions except they are not caught by catch
and finally blocks. Callbacks should honor aborts as well and return
them without processing them. Aborts are never thrown by JavaScript
code.
In the future certain events such as out-of-memory condition may
also throw aborts.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Diffstat (limited to 'docs')
-rw-r--r-- | docs/02.API-REFERENCE.md | 82 |
1 files changed, 81 insertions, 1 deletions
diff --git a/docs/02.API-REFERENCE.md b/docs/02.API-REFERENCE.md index 87f59bb0..1d18b611 100644 --- a/docs/02.API-REFERENCE.md +++ b/docs/02.API-REFERENCE.md @@ -1457,13 +1457,54 @@ jerry_value_has_error_flag (const jerry_value_t value); **See also** - [jerry_value_t](#jerry_value_t) +- [jerry_value_has_abort_flag](#jerry_value_has_abort_flag) + + +## jerry_value_has_abort_flag + +**Summary** + +Returns whether the given `jerry_value_t` has the error and abort flags set. + +**Prototype** + +```c +bool +jerry_value_has_abort_flag (const jerry_value_t value); +``` + +- `value` - api value +- return value + - true, if the given `jerry_value_t` has the error and abort flags set + - false, otherwise + +**Example** + +```c +{ + jerry_value_t value; + ... // create or acquire value + + if (jerry_value_has_abort_flag (value)) + { + ... + } + + jerry_release_value (value); +} +``` + +**See also** + +- [jerry_value_t](#jerry_value_t) +- [jerry_value_has_error_flag](#jerry_value_has_error_flag) ## jerry_value_clear_error_flag **Summary** -Clear the error flag. +Clear both the error and abort flags. **Prototype** @@ -1490,6 +1531,8 @@ jerry_value_clear_error_flag (jerry_value_t *value_p); **See also** - [jerry_value_t](#jerry_value_t) +- [jerry_value_set_error_flag](#jerry_value_set_error_flag) +- [jerry_value_set_abort_flag](#jerry_value_set_abort_flag) ## jerry_value_set_error_flag @@ -1523,6 +1566,43 @@ jerry_value_set_error_flag (jerry_value_t *value_p); **See also** - [jerry_value_t](#jerry_value_t) +- [jerry_value_clear_error_flag](#jerry_value_clear_error_flag) +- [jerry_value_set_abort_flag](#jerry_value_set_abort_flag) + + +## jerry_value_set_abort_flag + +**Summary** + +Set both the error and abort flags. + +**Prototype** + +```c +void +jerry_value_set_abort_flag (jerry_value_t *value_p); +``` + +- `value_p` - pointer to an api value + +**Example** + +```c +{ + jerry_value_t value; + ... // create or acquire value + + jerry_value_set_abort_flag (&value); + + jerry_release_value (value); +} +``` + +**See also** + +- [jerry_value_t](#jerry_value_t) +- [jerry_value_clear_error_flag](#jerry_value_clear_error_flag) +- [jerry_value_set_error_flag](#jerry_value_set_error_flag) ## jerry_get_value_without_error_flag |