Can't do this with a regex. Currently, the error facility only handles single line errors. You defined a multi-line regex which won't work. Didn't work for me. Change the regex to just find the filename and line number while excluding mismatches.
Add a _get_error_info_XXXX hook function to get the rest of the results you need.
There are number of these in error.e:
bool _get_error_info_as(_str &filename,_str &line,_str &col, _str &err_msg)
I wrote one which is pretty close to what you need:
bool _get_error_info_cc_IAR(_str &filename,_str &line,_str &col, _str &err_msg)
{
if (_isWindows()) return false;
if (filename=='' || line=='') {
return false;
}
get_line(auto cur_line);
// Verify we are dealing with the right error line
if (!pos("^:q,:i( +)Error",cur_line,1,'ri')) {
return false;
}
save_pos(auto p);
up();
get_line(cur_line);
restore_pos(p);
if (cur_line!='^') {
return false;
}
col=pos('^',cur_line);
if(!down()) {
get_line(err_msg);
err_msg=strip(err_msg);
restore_pos(p);
}
return true;
}