diff --git a/library/PolyVoxCore/include/PolyVoxCore/AStarPathfinder.inl b/library/PolyVoxCore/include/PolyVoxCore/AStarPathfinder.inl index 26c5c398..f01bff38 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/AStarPathfinder.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/AStarPathfinder.inl @@ -21,6 +21,8 @@ freely, subject to the following restrictions: distribution. *******************************************************************************/ +#include "PolyVoxCore/Impl/ErrorHandling.h" + namespace PolyVox { //////////////////////////////////////////////////////////////////////////////// @@ -159,7 +161,7 @@ namespace PolyVox if((openNodes.empty()) || (openNodes.getFirst() != endNode)) { //In this case we failed to find a valid path. - throw std::runtime_error("No path found"); + POLYVOX_THROW(std::runtime_error, "No path found"); } else { diff --git a/library/PolyVoxCore/include/PolyVoxCore/Impl/Block.inl b/library/PolyVoxCore/include/PolyVoxCore/Impl/Block.inl index 8927816c..cb597236 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Impl/Block.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/Impl/Block.inl @@ -21,7 +21,9 @@ freely, subject to the following restrictions: distribution. *******************************************************************************/ +#include "PolyVoxCore/Impl/ErrorHandling.h" #include "PolyVoxCore/Impl/Utility.h" + #include "PolyVoxCore/Vector.h" #include @@ -130,7 +132,7 @@ namespace PolyVox //Release mode validation if(!isPowerOf2(uSideLength)) { - throw std::invalid_argument("Block side length must be a power of two."); + POLYVOX_THROW(std::invalid_argument, "Block side length must be a power of two."); } //Compute the side length diff --git a/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl b/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl index c78abd20..fc476908 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl @@ -21,6 +21,8 @@ freely, subject to the following restrictions: distribution. *******************************************************************************/ +#include "PolyVoxCore/Impl/ErrorHandling.h" + //Included here rather than in the .h because it refers to LargeVolume (avoids forward declaration) #include "PolyVoxCore/ConstVolumeProxy.h" @@ -471,11 +473,11 @@ namespace PolyVox //Release mode validation if(uBlockSideLength == 0) { - throw std::invalid_argument("Block side length cannot be zero."); + POLYVOX_THROW(std::invalid_argument, "Block side length cannot be zero."); } if(!isPowerOf2(uBlockSideLength)) { - throw std::invalid_argument("Block side length must be a power of two."); + POLYVOX_THROW(std::invalid_argument, "Block side length must be a power of two."); } m_uTimestamper = 0; diff --git a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl index 62b48b4a..a818d70b 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl @@ -21,6 +21,8 @@ freely, subject to the following restrictions: distribution. *******************************************************************************/ +#include "PolyVoxCore/Impl/ErrorHandling.h" + namespace PolyVox { //////////////////////////////////////////////////////////////////////////////// @@ -253,15 +255,15 @@ namespace PolyVox //Release mode validation if(uBlockSideLength < 8) { - throw std::invalid_argument("Block side length should be at least 8"); + POLYVOX_THROW(std::invalid_argument, "Block side length should be at least 8"); } if(uBlockSideLength > 256) { - throw std::invalid_argument("Block side length should not be more than 256"); + POLYVOX_THROW(std::invalid_argument, "Block side length should not be more than 256"); } if(!isPowerOf2(uBlockSideLength)) { - throw std::invalid_argument("Block side length must be a power of two."); + POLYVOX_THROW(std::invalid_argument, "Block side length must be a power of two."); } this->m_regValidRegion = regValidRegion; diff --git a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolumeBlock.inl b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolumeBlock.inl index 03e8c687..e603ff81 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolumeBlock.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolumeBlock.inl @@ -21,6 +21,8 @@ freely, subject to the following restrictions: distribution. *******************************************************************************/ +#include "PolyVoxCore/Impl/ErrorHandling.h" + namespace PolyVox { template @@ -109,7 +111,7 @@ namespace PolyVox //Release mode validation if(!isPowerOf2(uSideLength)) { - throw std::invalid_argument("Block side length must be a power of two."); + POLYVOX_THROW(std::invalid_argument, "Block side length must be a power of two."); } //Compute the side length