[gtk+/parser: 49/80] cssprovider: Do error handling differently
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/parser: 49/80] cssprovider: Do error handling differently
- Date: Wed, 20 Apr 2011 16:18:06 +0000 (UTC)
commit 65dcea595666b45ccbf9e78b7e51a75996e50230
Author: Benjamin Otte <otte redhat com>
Date: Mon Apr 11 02:18:21 2011 +0200
cssprovider: Do error handling differently
Instead of aborting a parse whenever we encounter an error, parse to the
end. But if a GError was passed in, reset the provider completely as if
nothing had been parsed.
gtk/gtkcssprovider.c | 21 ---------------------
1 files changed, 0 insertions(+), 21 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 771f898..2f04855 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -2622,27 +2622,6 @@ parse_stylesheet (GtkCssProvider *css_provider,
if (expected_token != G_TOKEN_NONE)
{
- /* If a GError was passed in, propagate the error and bail out,
- * else report a warning and keep going
- */
- if (error != NULL)
- {
- result = FALSE;
- if (priv->error)
- g_propagate_error (error, priv->error);
- else
- g_set_error_literal (error,
- GTK_CSS_PROVIDER_ERROR,
- GTK_CSS_PROVIDER_ERROR_FAILED,
- "Error parsing stylesheet");
- break;
- }
- else
- {
- g_clear_error (&priv->error);
- priv->error = NULL;
- }
-
css_provider_reset_parser (css_provider);
while (!g_scanner_eof (scanner) &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]