diff options
Diffstat (limited to 'source/blender/python/generic/mathutils_Euler.c')
-rw-r--r-- | source/blender/python/generic/mathutils_Euler.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/python/generic/mathutils_Euler.c b/source/blender/python/generic/mathutils_Euler.c index 2888b0667f1..a7d6d921d16 100644 --- a/source/blender/python/generic/mathutils_Euler.c +++ b/source/blender/python/generic/mathutils_Euler.c @@ -99,7 +99,7 @@ short euler_order_from_string(const char *str, const char *error_prefix) } } - PyErr_Format(PyExc_TypeError, + PyErr_Format(PyExc_ValueError, "%s: invalid euler order '%s'", error_prefix, str); return -1; @@ -209,7 +209,7 @@ static PyObject *Euler_rotate_axis(EulerObject * self, PyObject *args) return NULL; } if(!(ELEM3(*axis, 'X', 'Y', 'Z') && axis[1]=='\0')){ - PyErr_SetString(PyExc_TypeError, "euler.rotate(): " + PyErr_SetString(PyExc_ValueError, "euler.rotate(): " "expected axis to be 'X', 'Y' or 'Z'"); return NULL; } @@ -449,7 +449,7 @@ static int Euler_ass_slice(EulerObject *self, int begin, int end, PyObject *seq) return -1; if(size != (end - begin)){ - PyErr_SetString(PyExc_TypeError, + PyErr_SetString(PyExc_ValueError, "euler[begin:end] = []: " "size mismatch in slice assignment"); return -1; @@ -486,7 +486,7 @@ static PyObject *Euler_subscript(EulerObject *self, PyObject *item) return Euler_slice(self, start, stop); } else { - PyErr_SetString(PyExc_TypeError, + PyErr_SetString(PyExc_IndexError, "slice steps not supported with eulers"); return NULL; } @@ -519,7 +519,7 @@ static int Euler_ass_subscript(EulerObject *self, PyObject *item, PyObject *valu if (step == 1) return Euler_ass_slice(self, start, stop, value); else { - PyErr_SetString(PyExc_TypeError, + PyErr_SetString(PyExc_IndexError, "slice steps not supported with euler"); return -1; } @@ -701,9 +701,7 @@ PyObject *newEulerObject(float *eul, short order, int type, PyTypeObject *base_t self->wrapped = Py_NEW; } else { - PyErr_SetString(PyExc_RuntimeError, - "Euler(): invalid type, internal error"); - return NULL; + Py_FatalError("Euler(): invalid type!"); } self->order= order; |