Include file path in Syntax error messages (#2941)

When using ES6 modules it was not possible to identify which module
an error originates from.

This PR changes the error message to also include the file path using
the file:line:column format, and updates the source context printing for
unhandled exceptions to use the correct file.

Co-authored-by: Marko Fabo <mfabo@inf.u-szeged.hu>
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
Dániel Bátyai
2019-07-11 12:33:02 +02:00
committed by GitHub
parent 3f47e1b0aa
commit c304b9a38a
12 changed files with 204 additions and 123 deletions
+2 -2
View File
@@ -191,9 +191,9 @@ struct jerry_context_t
uint8_t debugger_max_receive_size; /**< maximum amount of data that can be received */
#endif /* ENABLED (JERRY_DEBUGGER) */
#if ENABLED (JERRY_LINE_INFO)
#if ENABLED (JERRY_LINE_INFO) || ENABLED (JERRY_ERROR_MESSAGES)
ecma_value_t resource_name; /**< resource name (usually a file name) */
#endif /* ENABLED (JERRY_LINE_INFO) */
#endif /* ENABLED (JERRY_LINE_INFO) || ENABLED (JERRY_ERROR_MESSAGES) */
#if ENABLED (JERRY_MEM_STATS)
jmem_heap_stats_t jmem_heap_stats; /**< heap's memory usage statistics */