From 080a97cccf39d66ac83daf9998e6a3e207dccf5a Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Wed, 8 Aug 2018 19:50:26 +0200 Subject: [PATCH] Cython API: more explicit "Can't guess type" exception --- python/obitools3/dms/view/view.pyx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/obitools3/dms/view/view.pyx b/python/obitools3/dms/view/view.pyx index 32fae7b..c583267 100644 --- a/python/obitools3/dms/view/view.pyx +++ b/python/obitools3/dms/view/view.pyx @@ -469,7 +469,7 @@ cdef class Line : elif (len(value) > 1) : value_obitype = OBI_STR else : - raise CantGuessTypeException() + raise CantGuessTypeException(value) #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) @@ -651,7 +651,8 @@ class RollbackException(Exception): class CantGuessTypeException(Exception): - pass + def __init__(self, object value) : + raise Exception("Can't guess type to set value:", value) #############################################################