diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2016-08-17 11:36:24 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2016-08-17 11:36:24 -0400 |
commit | 5e9d2f57c82a57307a48afea09aa539b9fa80abf (patch) | |
tree | ea16b2c580c2a831f54c217deb5d64b8d755eff4 /indra/llimage/llpngwrapper.cpp | |
parent | 1ed76c382e8b87bff02b6d37cf8acd7f6b1f8063 (diff) |
MAINT-5011: Use LLTHROW() instead of plain BOOST_THROW_EXCEPTION().
A level of preprocessor indirection lets us later change the implementation if
desired.
Diffstat (limited to 'indra/llimage/llpngwrapper.cpp')
-rw-r--r-- | indra/llimage/llpngwrapper.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/indra/llimage/llpngwrapper.cpp b/indra/llimage/llpngwrapper.cpp index 0b7d4c717f..640eda7b01 100644 --- a/indra/llimage/llpngwrapper.cpp +++ b/indra/llimage/llpngwrapper.cpp @@ -32,7 +32,6 @@ #include "llpngwrapper.h" #include "llexception.h" -#include <boost/throw_exception.hpp> namespace { struct PngError: public LLException @@ -88,7 +87,7 @@ BOOL LLPngWrapper::isValidPng(U8* src) // occurs. We throw PngError and let our try/catch block clean up. void LLPngWrapper::errorHandler(png_structp png_ptr, png_const_charp msg) { - BOOST_THROW_EXCEPTION(PngError(msg)); + LLTHROW(PngError(msg)); } // Called by the libpng library when reading (decoding) the PNG file. We @@ -138,7 +137,7 @@ BOOL LLPngWrapper::readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInf this, &errorHandler, NULL); if (mReadPngPtr == NULL) { - BOOST_THROW_EXCEPTION(PngError("Problem creating png read structure")); + LLTHROW(PngError("Problem creating png read structure")); } // Allocate/initialize the memory for image information. @@ -297,14 +296,14 @@ BOOL LLPngWrapper::writePng(const LLImageRaw* rawImage, U8* dest) if (mColorType == -1) { - BOOST_THROW_EXCEPTION(PngError("Unsupported image: unexpected number of channels")); + LLTHROW(PngError("Unsupported image: unexpected number of channels")); } mWritePngPtr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, &errorHandler, NULL); if (!mWritePngPtr) { - BOOST_THROW_EXCEPTION(PngError("Problem creating png write structure")); + LLTHROW(PngError("Problem creating png write structure")); } mWriteInfoPtr = png_create_info_struct(mWritePngPtr); |