Work on error handling. I replaced some asserts with exceptions and also added basic error handling documentation.
This commit is contained in:
@ -31,6 +31,7 @@ namespace PolyVox
|
||||
const Type& v0,const Type& v1,
|
||||
const float x)
|
||||
{
|
||||
//This function is called frequently and is very short, so assert rather than exceptions.
|
||||
POLYVOX_ASSERT((x >= 0.0f) && (x <= 1.0f), "Interpolation input out of 0.0 to 1.0 range.");
|
||||
|
||||
//Interpolate along X
|
||||
@ -44,6 +45,7 @@ namespace PolyVox
|
||||
const Type& v00,const Type& v10,const Type& v01,const Type& v11,
|
||||
const float x, const float y)
|
||||
{
|
||||
//This function is called frequently and is very short, so assert rather than exceptions.
|
||||
POLYVOX_ASSERT((x >= 0.0f) && (y >= 0.0f) &&
|
||||
(x <= 1.0f) && (y <= 1.0f), "Interpolation input out of 0.0 to 1.0 range.");
|
||||
|
||||
@ -63,6 +65,7 @@ namespace PolyVox
|
||||
const Type& v001,const Type& v101,const Type& v011,const Type& v111,
|
||||
const float x, const float y, const float z)
|
||||
{
|
||||
//This function is called frequently and is very short, so assert rather than exceptions.
|
||||
POLYVOX_ASSERT((x >= 0.0f) && (y >= 0.0f) && (z >= 0.0f) &&
|
||||
(x <= 1.0f) && (y <= 1.0f) && (z <= 1.0f), "Interpolation input out of 0.0 to 1.0 range.");
|
||||
|
||||
|
Reference in New Issue
Block a user