Skip to content

Commit 6a60775

Browse files
committed
Terminate with signal in case of an assert
Automated debugging is easier if the process terminates with a signal instead of a regular `exit (code);` call, since in this latter case the cause of error cannot be automatically backtraced. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss [email protected]
1 parent a838461 commit 6a60775

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

jerry-core/jrt/jrt-fatals.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,14 @@ jerry_fatal (jerry_fatal_code_t code) /**< status code */
6262
}
6363
#endif /* !JERRY_NDEBUG */
6464

65-
exit (code);
65+
if (code == ERR_FAILED_INTERNAL_ASSERTION)
66+
{
67+
abort ();
68+
}
69+
else
70+
{
71+
exit (code);
72+
}
6673
} /* jerry_fatal */
6774

6875
/**

0 commit comments

Comments
 (0)