Fixed #393 (properly show DRC syntax errors)

This commit is contained in:
Matthias Koefferlein 2019-11-03 19:01:46 +01:00
parent 078aa36974
commit 4f49447fe8
1 changed files with 7 additions and 1 deletions

View File

@ -160,7 +160,13 @@ rba_check_error ()
// parse the backtrace to get the line number
tl::BacktraceElement info;
if (! bt.empty ()) {
if (CLASS_OF (lasterr) == rb_eSyntaxError) {
// for syntax errors we try to parse the message
info = rba_split_bt_information (emsg.c_str (), emsg.size ());
if (info.line == 0 && ! bt.empty ()) {
info = bt.front ();
}
} else if (! bt.empty ()) {
// use the backtrace
info = bt.front ();
} else {