~ubuntu-branches/ubuntu/vivid/rawstudio/vivid

« back to all changes in this revision

Viewing changes to plugins/load-rawspeed/rawspeed/TiffParserException.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Bernd Zeimetz
  • Date: 2011-07-28 17:36:32 UTC
  • mfrom: (2.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20110728173632-5czluz9ye3c83zc5
Tags: 2.0-1
* [3750b2cf] Merge commit 'upstream/2.0'
* [63637468] Removing Patch, not necessary anymore.
* [2fb580dc] Add new build-dependencies.
* [c57d953b] Run dh_autoreconf due to patches in configure.in
* [13febe39] Add patch to remove the libssl requirement.
* [5ae773fe] Replace libjpeg62-dev by libjpeg8-dev :)
* [1969d755] Don't build static libraries.
* [7cfe0a2e] Add a patch to fix the plugin directory path.
  As plugins are shared libraries, they need to go into /usr/lib,
  not into /usr/share.
  Thanks to Andrew McMillan
* [c1d0d9dd] Don't install .la files for all plugins and libraries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "StdAfx.h"
 
2
#include "TiffParserException.h"
 
3
#if !defined(WIN32) || defined(__MINGW32__)
 
4
#include <stdarg.h>
 
5
#define vsprintf_s(...) vsnprintf(__VA_ARGS__)
 
6
#endif
 
7
 
 
8
/*
 
9
    RawSpeed - RAW file decoder.
 
10
 
 
11
    Copyright (C) 2009 Klaus Post
 
12
 
 
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.
 
17
 
 
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.
 
22
 
 
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
 
26
 
 
27
    http://www.klauspost.com
 
28
*/
 
29
 
 
30
namespace RawSpeed {
 
31
 
 
32
TiffParserException::TiffParserException(const string _msg) : runtime_error(_msg) {
 
33
  _RPT1(0, "TIFF Exception: %s\n", _msg.c_str());
 
34
};
 
35
 
 
36
void ThrowTPE(const char* fmt, ...) {
 
37
  va_list val;
 
38
  va_start(val, fmt);
 
39
  char buf[8192];
 
40
  vsprintf_s(buf, 8192, fmt, val);
 
41
  va_end(val);
 
42
  _RPT1(0, "EXCEPTION: %s\n", buf);
 
43
  throw TiffParserException(buf);
 
44
}
 
45
 
 
46
} // namespace RawSpeed