diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-14 13:54:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-14 13:54:03 +0400 |
commit | b028cba0e4878b5034b96772aba85abc9f669a12 (patch) | |
tree | aba21b258be65911c00d5f0d8b61487c840b27f1 /source/blender/python/generic/mathutils_geometry.c | |
parent | f70f16723741405ab3c32b9e1f05af35ecf9eb21 (diff) |
many mathutils exception types were wrong, went over all exceptions in mathutils and double checked the're correct.
Diffstat (limited to 'source/blender/python/generic/mathutils_geometry.c')
-rw-r--r-- | source/blender/python/generic/mathutils_geometry.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/python/generic/mathutils_geometry.c b/source/blender/python/generic/mathutils_geometry.c index 601daf01d00..d2724f6603e 100644 --- a/source/blender/python/generic/mathutils_geometry.c +++ b/source/blender/python/generic/mathutils_geometry.c @@ -556,7 +556,7 @@ static PyObject *M_Geometry_intersect_line_plane(PyObject *UNUSED(self), PyObjec } if(ELEM4(2, line_a->size, line_b->size, plane_co->size, plane_no->size)) { - PyErr_SetString(PyExc_RuntimeError, + PyErr_SetString(PyExc_ValueError, "geometry.intersect_line_plane(...): " " can't use 2D Vectors"); return NULL; @@ -614,7 +614,7 @@ static PyObject *M_Geometry_intersect_line_sphere(PyObject *UNUSED(self), PyObje } if(ELEM3(2, line_a->size, line_b->size, sphere_co->size)) { - PyErr_SetString(PyExc_RuntimeError, + PyErr_SetString(PyExc_ValueError, "geometry.intersect_line_sphere(...): " " can't use 2D Vectors"); return NULL; @@ -881,6 +881,7 @@ static int boxPack_FromPyObject(PyObject *value, boxPack **boxarray) box->h= (float)PyFloat_AsDouble(item_2); box->index= i; + /* accounts for error case too and overwrites with own error */ if (box->w < 0.0f || box->h < 0.0f) { MEM_freeN(*boxarray); PyErr_SetString(PyExc_TypeError, @@ -1075,7 +1076,7 @@ static PyObject *M_Geometry_barycentric_transform(PyObject *UNUSED(self), PyObje vec_t3_tar->size != 3) { PyErr_SetString(PyExc_ValueError, - "One of more of the vector arguments wasnt a 3D vector"); + "One of more of the vector arguments wasn't a 3D vector"); return NULL; } |