error.hpp File Reference

Error class for exceptions, log message class. More...

#include "types.hpp"
#include <exception>
#include <string>
#include <iosfwd>
#include <sstream>

Classes

class  Exiv2::LogMsg
 Class for a log message, used by the library. Applications can set the log level and provide a customer log message handler (callback function). More...
 
class  Exiv2::AnyError
 Error class interface. Allows the definition and use of a hierarchy of error classes which can all be handled in one catch block. Inherits from the standard exception base-class, to make life easier for library users (they have the option of catching most things via std::exception). More...
 
class  Exiv2::BasicError< charT >
 Simple error class used for exceptions. An output operator is provided to print errors to a stream. More...
 

Namespaces

 Exiv2
 Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of the objects of this namespace.
 

Macros

#define EXV_DEBUG   if (LogMsg::debug >= LogMsg::level() && LogMsg::handler()) LogMsg(LogMsg::debug).os()
 Shorthand to create a temp debug log message object and return its ostringstream.
 
#define EXV_INFO   if (LogMsg::info >= LogMsg::level() && LogMsg::handler()) LogMsg(LogMsg::info).os()
 Shorthand for a temp info log message object and return its ostringstream.
 
#define EXV_WARNING   if (LogMsg::warn >= LogMsg::level() && LogMsg::handler()) LogMsg(LogMsg::warn).os()
 Shorthand for a temp warning log message object and return its ostringstream.
 
#define EXV_ERROR   if (LogMsg::error >= LogMsg::level() && LogMsg::handler()) LogMsg(LogMsg::error).os()
 Shorthand for a temp error log message object and return its ostringstream.
 

Typedefs

typedef BasicError< char > Exiv2::Error
 Error class used for exceptions (std::string based)
 

Functions

template<typename charT , typename T >
std::basic_string< charT > Exiv2::toBasicString (const T &arg)
 Generalised toString function.
 
std::ostream & Exiv2::operator<< (std::ostream &os, const AnyError &error)
 AnyError output operator
 
EXIV2API const char * Exiv2::errMsg (int code)
 Return the error message for the error with code code.
 

Detailed Description

Error class for exceptions, log message class.

Version
Rev
3091
Author
Andreas Huggel (ahu) ahuggel@gmx.net
Date
15-Jan-04, ahu: created
11-Feb-04, ahu: isolated as a component