Add backtrace print when the 'assert' js method fails (#3051)

In the jerry-ext there is a native 'assert' handler implemented.
This change adds extra backtrace information if an 'assert' call fails.

To print out the backtrace the library should be built with `JERRY_LINE_INFO` enabled.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
This commit is contained in:
Péter Gál
2019-09-05 13:07:21 +02:00
committed by Dániel Bátyai
parent 96edec1a62
commit 57f389dcf4
2 changed files with 54 additions and 0 deletions
+3
View File
@@ -421,6 +421,9 @@ For example usage see [jerryx_set_properties](#jerryx_set_properties).
Hard assert for scripts. The routine calls `jerry_port_fatal` on assertion failure.
If the `JERRY_FEATURE_LINE_INFO` runtime feature is enabled (build option: `JERRY_LINE_INFO`)
a backtrace is also printed out.
**Prototype**
```c