You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by uw...@apache.org on 2018/05/08 07:58:07 UTC

[arrow] branch master updated: ARROW-2549: [GLib] Apply arrow::StatusCode changes to GArrowError

This is an automated email from the ASF dual-hosted git repository.

uwe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new a426c1b  ARROW-2549: [GLib] Apply arrow::StatusCode changes to GArrowError
a426c1b is described below

commit a426c1b8d9dbe29d16ddfbabf2c7e540aa9d2d86
Author: Kouhei Sutou <ko...@clear-code.com>
AuthorDate: Tue May 8 09:57:58 2018 +0200

    ARROW-2549: [GLib] Apply arrow::StatusCode changes to GArrowError
    
    Author: Kouhei Sutou <ko...@clear-code.com>
    
    Closes #2009 from kou/glib-update-status and squashes the following commits:
    
    8be78984 <Kouhei Sutou>  Apply arrow::StatusCode changes to GArrowError
---
 c_glib/arrow-glib/error.cpp | 14 ++++++++++++++
 c_glib/arrow-glib/error.h   | 17 ++++++++++++++++-
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/c_glib/arrow-glib/error.cpp b/c_glib/arrow-glib/error.cpp
index 298f5df..9ebbdc7 100644
--- a/c_glib/arrow-glib/error.cpp
+++ b/c_glib/arrow-glib/error.cpp
@@ -55,10 +55,24 @@ garrow_error_code(const arrow::Status &status)
     return GARROW_ERROR_INVALID;
   case arrow::StatusCode::IOError:
     return GARROW_ERROR_IO;
+  case arrow::StatusCode::CapacityError:
+    return GARROW_ERROR_CAPACITY;
   case arrow::StatusCode::UnknownError:
     return GARROW_ERROR_UNKNOWN;
   case arrow::StatusCode::NotImplemented:
     return GARROW_ERROR_NOT_IMPLEMENTED;
+  case arrow::StatusCode::SerializationError:
+    return GARROW_ERROR_SERIALIZATION;
+  case arrow::StatusCode::PythonError:
+    return GARROW_ERROR_PYTHON;
+  case arrow::StatusCode::PlasmaObjectExists:
+    return GARROW_ERROR_PLASMA_OBJECT_EXISTS;
+  case arrow::StatusCode::PlasmaObjectNonexistent:
+    return GARROW_ERROR_PLASMA_OBJECT_NONEXISTENT;
+  case arrow::StatusCode::PlasmaStoreFull:
+    return GARROW_ERROR_PLASMA_STORE_FULL;
+  case arrow::StatusCode::PlasmaObjectAlreadySealed:
+    return GARROW_ERROR_PLASMA_OBJECT_ALREADY_SEALED;
   default:
     return GARROW_ERROR_UNKNOWN;
   }
diff --git a/c_glib/arrow-glib/error.h b/c_glib/arrow-glib/error.h
index b4a4fac..0a0b2b1 100644
--- a/c_glib/arrow-glib/error.h
+++ b/c_glib/arrow-glib/error.h
@@ -30,8 +30,16 @@ G_BEGIN_DECLS
  * @GARROW_ERROR_TYPE: Type error.
  * @GARROW_ERROR_INVALID: Invalid value error.
  * @GARROW_ERROR_IO: IO error.
+ * @GARROW_ERROR_CAPACITY: Capacity error.
  * @GARROW_ERROR_UNKNOWN: Unknown error.
  * @GARROW_ERROR_NOT_IMPLEMENTED: The feature is not implemented.
+ * @GARROW_ERROR_SERIALIZATION: Serialization error.
+ * @GARROW_ERROR_PYTHON: Python error.
+ * @GARROW_ERROR_PLASMA_OBJECT_EXISTS: Object already exists on Plasma.
+ * @GARROW_ERROR_PLASMA_OBJECT_NONEXISTENT: Object doesn't exist on Plasma.
+ * @GARROW_ERROR_PLASMA_STORE_FULL: Store full error on Plasma.
+ * @GARROW_ERROR_PLASMA_OBJECT_ALREADY_SEALED:
+ *   Object is already sealed on Plasma.
  *
  * The error codes are used by all arrow-glib functions.
  *
@@ -43,8 +51,15 @@ typedef enum {
   GARROW_ERROR_TYPE,
   GARROW_ERROR_INVALID,
   GARROW_ERROR_IO,
+  GARROW_ERROR_CAPACITY,
   GARROW_ERROR_UNKNOWN = 9,
-  GARROW_ERROR_NOT_IMPLEMENTED = 10
+  GARROW_ERROR_NOT_IMPLEMENTED,
+  GARROW_ERROR_SERIALIZATION,
+  GARROW_ERROR_PYTHON,
+  GARROW_ERROR_PLASMA_OBJECT_EXISTS = 20,
+  GARROW_ERROR_PLASMA_OBJECT_NONEXISTENT,
+  GARROW_ERROR_PLASMA_STORE_FULL,
+  GARROW_ERROR_PLASMA_OBJECT_ALREADY_SEALED,
 } GArrowError;
 
 #define GARROW_ERROR garrow_error_quark()

-- 
To stop receiving notification emails like this one, please contact
uwe@apache.org.