[librsvg/rustification] rsvg-styles: Use g_message() instead of g_warning() for errors from libcroco
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/rustification] rsvg-styles: Use g_message() instead of g_warning() for errors from libcroco
- Date: Fri, 11 Nov 2016 17:03:36 +0000 (UTC)
commit 1088bea7224077dff3b7c943cede57575b161362
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Nov 11 09:58:39 2016 -0600
rsvg-styles: Use g_message() instead of g_warning() for errors from libcroco
Our test suite considers a test to fail if it calls g_warning(). Our
code that uses libcroco would call g_warning() on invalid or unsupported
CSS in <style> blocks, and this would causes tests to fail as if there
were something wrong with out code, not with the CSS itself.
We'll have to have a way to report CSS errors upstream, and tests for
specific kinds of errors.
rsvg-styles.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/rsvg-styles.c b/rsvg-styles.c
index 9ac401b..eea61dc 100644
--- a/rsvg-styles.c
+++ b/rsvg-styles.c
@@ -1176,7 +1176,7 @@ ccss_error (CRDocHandler * a_handler)
{
/* yup, like i care about CSS parsing errors ;-)
ignore, chug along */
- g_warning (_("CSS parsing error\n"));
+ g_message (_("CSS parsing error\n"));
}
static void
@@ -1184,7 +1184,7 @@ ccss_unrecoverable_error (CRDocHandler * a_handler)
{
/* yup, like i care about CSS parsing errors ;-)
ignore, chug along */
- g_warning (_("CSS unrecoverable error\n"));
+ g_message (_("CSS unrecoverable error\n"));
}
static void
@@ -1243,6 +1243,10 @@ rsvg_parse_cssbuffer (RsvgHandle * ctx, const char *buff, size_t buflen)
cr_parser_set_use_core_grammar (parser, FALSE);
cr_parser_parse (parser);
+ /* FIXME: we aren't reporting errors in the CSS; we have no way to know if
+ * we should print the "buff" for diagnostics.
+ */
+
cr_parser_destroy (parser);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]