2
#include "TiffParserException.h"
3
#if !defined(WIN32) || defined(__MINGW32__)
5
#define vsprintf_s(...) vsnprintf(__VA_ARGS__)
9
RawSpeed - RAW file decoder.
11
Copyright (C) 2009 Klaus Post
13
This library is free software; you can redistribute it and/or
14
modify it under the terms of the GNU Lesser General Public
15
License as published by the Free Software Foundation; either
16
version 2 of the License, or (at your option) any later version.
18
This library is distributed in the hope that it will be useful,
19
but WITHOUT ANY WARRANTY; without even the implied warranty of
20
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
Lesser General Public License for more details.
23
You should have received a copy of the GNU Lesser General Public
24
License along with this library; if not, write to the Free Software
25
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27
http://www.klauspost.com
32
TiffParserException::TiffParserException(const string _msg) : runtime_error(_msg) {
33
_RPT1(0, "TIFF Exception: %s\n", _msg.c_str());
36
void ThrowTPE(const char* fmt, ...) {
40
vsprintf_s(buf, 8192, fmt, val);
42
_RPT1(0, "EXCEPTION: %s\n", buf);
43
throw TiffParserException(buf);
46
} // namespace RawSpeed