[gnome-builder] core: add ignore error helper



commit 17f6d671348ae13d95e05f6f21d04269c3db1faa
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jan 21 23:29:43 2019 -0800

    core: add ignore error helper

 src/libide/core/ide-macros.h | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/src/libide/core/ide-macros.h b/src/libide/core/ide-macros.h
index 6519df04b..b46d1e7d8 100644
--- a/src/libide/core/ide-macros.h
+++ b/src/libide/core/ide-macros.h
@@ -55,6 +55,13 @@ G_BEGIN_DECLS
   ({ IDE_PTR_ARRAY_CLEAR_FREE_FUNC (*(arptr)); \
      g_steal_pointer ((arptr)); })
 
+static inline gboolean
+ide_error_ignore (const GError *error)
+{
+  return g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED) ||
+         g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
+}
+
 static inline void
 _g_object_unref0 (gpointer instance)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]