diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-03-13 16:42:17 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-03-13 16:42:17 +0100 |
commit | 9cfb075bc469faa11941cc7b2a9a1be5e0443038 (patch) | |
tree | 8d6779d87fd60e8d688e764768c695715a38a376 /source/theme.c | |
parent | d67a562d884bbb8152bf75a21e97f7539a75bd25 (diff) |
Add filename to location in error message.
Diffstat (limited to 'source/theme.c')
-rw-r--r-- | source/theme.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/theme.c b/source/theme.c index 26824275..122fa6a4 100644 --- a/source/theme.c +++ b/source/theme.c @@ -270,9 +270,15 @@ void yyerror ( YYLTYPE *yylloc, const char *what, const char* s ) g_string_printf ( str, "<big><b>Error while parsing theme:</b></big> <i>%s</i>\n", what_esc ); g_free ( what_esc ); char *esc = g_markup_escape_text ( s, -1 ); - g_string_append_printf ( str, "\tParser error: <i>%s</i>\n", esc ); + g_string_append_printf ( str, "\tParser error: <span size=\"smaller\" style=\"italic\">%s</span>\n", esc ); g_free ( esc ); - g_string_append_printf ( str, "\tLocation: line %d column %d to line %d column %d\n", yylloc->first_line, yylloc->first_column, yylloc->last_line, yylloc->last_column ); + if ( yylloc->filename != NULL ) { + g_string_append_printf ( str, "\tLocation: line %d column %d to line %d column %d.\n"\ + "\tFile '%s'\n", yylloc->first_line, yylloc->first_column, yylloc->last_line, yylloc->last_column, yylloc->filename); + + }else { + g_string_append_printf ( str, "\tLocation: line %d column %d to line %d column %d\n", yylloc->first_line, yylloc->first_column, yylloc->last_line, yylloc->last_column ); + } rofi_add_error_message ( str ); } |