Raise an exception when an error takes place
(https://github.com/oracle/python-cx_Oracle/issues/299).
This commit is contained in:
parent
1c474bbaab
commit
ce511e2fb7
@ -246,7 +246,9 @@ int cxoTransform_fromPython(cxoTransformNum transformNum, PyObject *pyValue,
|
||||
status = dpiLob_setFromBytes(dbValue->asLOB, buffer->ptr,
|
||||
buffer->size);
|
||||
Py_END_ALLOW_THREADS
|
||||
return status;
|
||||
if (status < 0)
|
||||
return cxoError_raiseAndReturnInt();
|
||||
return 0;
|
||||
case CXO_TRANSFORM_NATIVE_INT:
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
if (PyInt_Check(pyValue)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user