Cython API: more explicit "Can't guess type" exception

This commit is contained in:
Celine Mercier
2018-08-08 19:50:26 +02:00
parent 9c9aec2556
commit 080a97cccf

View File

@ -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)
############################################################# #############################################################