Cython API: more explicit "Can't guess type" exception
This commit is contained in:
@ -469,7 +469,7 @@ cdef class Line :
|
|||||||
elif (len(value) > 1) :
|
elif (len(value) > 1) :
|
||||||
value_obitype = OBI_STR
|
value_obitype = OBI_STR
|
||||||
else :
|
else :
|
||||||
raise CantGuessTypeException()
|
raise CantGuessTypeException(value)
|
||||||
#raise RollbackException("Could not guess the type of a value to create a new column", self._view)
|
#raise RollbackException("Could not guess the type of a value to create a new column", self._view)
|
||||||
|
|
||||||
Column.new_column(self._view, column_name_b, value_obitype)
|
Column.new_column(self._view, column_name_b, value_obitype)
|
||||||
@ -651,7 +651,8 @@ class RollbackException(Exception):
|
|||||||
|
|
||||||
|
|
||||||
class CantGuessTypeException(Exception):
|
class CantGuessTypeException(Exception):
|
||||||
pass
|
def __init__(self, object value) :
|
||||||
|
raise Exception("Can't guess type to set value:", value)
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user