error.hpp File Reference

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

#include "exiv2lib_export.h"
#include "config.h"
#include <exception>
#include <sstream>
#include <string>

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::Error
 Simple error class used for exceptions. An output operator is provided to print errors to a stream. More...
 

Namespaces

 Exiv2
 Class CrwImage to access Canon CRW images.
References:
The Canon RAW (CRW) File Format by Phil Harvey.
 

Macros

#define EXV_DEBUG
 Shorthand to create a temp debug log message object and return its ostringstream. More...
 
#define EXV_INFO
 Shorthand for a temp info log message object and return its ostringstream. More...
 
#define EXV_WARNING
 Shorthand for a temp warning log message object and return its ostringstream. More...
 
#define EXV_ERROR
 Shorthand for a temp error log message object and return its ostringstream. More...
 

Enumerations

enum class  Exiv2::ErrorCode {
  kerSuccess = 0 , kerGeneralError , kerErrorMessage , kerCallFailed ,
  kerNotAnImage , kerInvalidDataset , kerInvalidRecord , kerInvalidKey ,
  kerInvalidTag , kerValueNotSet , kerDataSourceOpenFailed , kerFileOpenFailed ,
  kerFileContainsUnknownImageType , kerMemoryContainsUnknownImageType , kerUnsupportedImageType , kerFailedToReadImageData ,
  kerNotAJpeg , kerFailedToMapFileForReadWrite , kerFileRenameFailed , kerTransferFailed ,
  kerMemoryTransferFailed , kerInputDataReadFailed , kerImageWriteFailed , kerNoImageInInputData ,
  kerInvalidIfdId , kerValueTooLarge , kerDataAreaValueTooLarge , kerOffsetOutOfRange ,
  kerUnsupportedDataAreaOffsetType , kerInvalidCharset , kerUnsupportedDateFormat , kerUnsupportedTimeFormat ,
  kerWritingImageFormatUnsupported , kerInvalidSettingForImage , kerNotACrwImage , kerFunctionNotSupported ,
  kerNoNamespaceInfoForXmpPrefix , kerNoPrefixForNamespace , kerTooLargeJpegSegment , kerUnhandledXmpdatum ,
  kerUnhandledXmpNode , kerXMPToolkitError , kerDecodeLangAltPropertyFailed , kerDecodeLangAltQualifierFailed ,
  kerEncodeLangAltPropertyFailed , kerPropertyNameIdentificationFailed , kerSchemaNamespaceNotRegistered , kerNoNamespaceForPrefix ,
  kerAliasesNotSupported , kerInvalidXmpText , kerTooManyTiffDirectoryEntries , kerMultipleTiffArrayElementTagsInDirectory ,
  kerWrongTiffArrayElementTagType , kerInvalidKeyXmpValue , kerInvalidIccProfile , kerInvalidXMP ,
  kerTiffDirectoryTooLarge , kerInvalidTypeValue , kerInvalidLangAltValue , kerInvalidMalloc ,
  kerCorruptedMetadata , kerArithmeticOverflow , kerMallocFailed , kerInvalidIconvEncoding ,
  kerErrorCount
}
 Complete list of all Exiv2 error codes.
 

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 Error &error)
 Error output operator
 

Detailed Description

Error class for exceptions, log message class.

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

Macro Definition Documentation

◆ EXV_DEBUG

#define EXV_DEBUG
Value:
if (LogMsg::debug >= LogMsg::level() && LogMsg::handler()) \
LogMsg(LogMsg::debug).os()

Shorthand to create a temp debug log message object and return its ostringstream.

◆ EXV_ERROR

#define EXV_ERROR
Value:
if (LogMsg::error >= LogMsg::level() && LogMsg::handler()) \
LogMsg(LogMsg::error).os()

Shorthand for a temp error log message object and return its ostringstream.

◆ EXV_INFO

#define EXV_INFO
Value:
if (LogMsg::info >= LogMsg::level() && LogMsg::handler()) \
LogMsg(LogMsg::info).os()

Shorthand for a temp info log message object and return its ostringstream.

◆ EXV_WARNING

#define EXV_WARNING
Value:
if (LogMsg::warn >= LogMsg::level() && LogMsg::handler()) \
LogMsg(LogMsg::warn).os()

Shorthand for a temp warning log message object and return its ostringstream.