Merge branch 'css-error-fixes' into 'main'

css: Propagate errors properly

See merge request GNOME/gtk!7313
This commit is contained in:
Matthias Clasen 2024-05-29 23:13:14 +00:00
commit 51bd155670
2 changed files with 9 additions and 2 deletions

View File

@ -224,11 +224,11 @@ parser_error (GtkCssParser *parser,
if (names[i + 1])
g_set_error (&new_error,
GTK_CSS_PARSER_ERROR, GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE,
error->domain, error->code,
"While expanding %s: %s", names[i + 1], error->message);
else
g_set_error_literal (&new_error,
GTK_CSS_PARSER_ERROR, GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE,
error->domain, error->code,
error->message);
if (vars[i]->section == NULL)

View File

@ -76,6 +76,13 @@ G_BEGIN_DECLS
* Since: 4.8
*/
/**
* GTK_DEBUG_CSS:
*
* Information about deprecated CSS features.
*
* Since: 4.16
*/
typedef enum {
GTK_DEBUG_TEXT = 1 << 0,
GTK_DEBUG_TREE = 1 << 1,