Skip to content

Commit eeeb088

Browse files
committed
Remove TileDBError from libtiledb
1 parent e51f9a0 commit eeeb088

File tree

3 files changed

+5
-27
lines changed

3 files changed

+5
-27
lines changed

tiledb/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
# Otherwise try loading by name only.
3434
ctypes.CDLL(lib_name)
3535

36+
from .cc import TileDBError
37+
3638
from .ctx import default_ctx, scope_ctx
3739
from .libtiledb import (
3840
Array,
@@ -42,7 +44,6 @@
4244
Domain,
4345
Attr,
4446
ArraySchema,
45-
TileDBError,
4647
consolidate,
4748
group_create,
4849
object_type,

tiledb/libtiledb.pxd

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,9 +1273,5 @@ cdef class ReadQuery(object):
12731273
cdef class Metadata(object):
12741274
cdef object array_ref
12751275

1276-
cdef class TileDBError(Exception):
1277-
pass
1278-
1279-
12801276
IF (not TILEDBPY_MODULAR):
12811277
include "indexing.pxd"

tiledb/libtiledb.pyx

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ from .filter import FilterList
1717
from .vfs import VFS
1818

1919
import tiledb.cc as lt
20+
from tiledb.cc import TileDBError
21+
2022

2123
###############################################################################
2224
# Numpy initialization code (critical) #
@@ -27,7 +29,7 @@ np.import_array()
2729

2830

2931
###############################################################################
30-
# MODULAR IMPORTS #
32+
# MODULAR IMPORTS #
3133
###############################################################################
3234

3335
IF TILEDBPY_MODULAR:
@@ -493,27 +495,6 @@ cdef _write_array(tiledb_ctx_t* ctx_ptr,
493495
tiledb_query_free(&query_ptr)
494496
return
495497

496-
497-
cdef class TileDBError(Exception):
498-
"""TileDB Error Exception
499-
500-
Captures and raises error return code (``TILEDB_ERR``) messages when calling ``libtiledb``
501-
functions. The error message that is raised is the last error set for the :py:class:`tiledb.Ctx`
502-
503-
A Python :py:class:`MemoryError` is raised on ``TILEDB_OOM``
504-
505-
"""
506-
507-
@property
508-
def message(self):
509-
"""The TileDB error message string
510-
511-
:rtype: str
512-
:return: error message
513-
514-
"""
515-
return self.args[0]
516-
517498
cdef _raise_tiledb_error(tiledb_error_t* err_ptr):
518499
cdef const char* err_msg_ptr = NULL
519500
ret = tiledb_error_message(err_ptr, &err_msg_ptr)

0 commit comments

Comments
 (0)