Exiv2
Classes | Namespaces | Macros | Enumerations | Functions
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>

Go to the source code of this file.

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  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

#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.

Referenced by Exiv2::EpsImage::EpsImage(), Exiv2::EpsImage::readMetadata(), and Exiv2::EpsImage::writeMetadata().

#define EXV_ERROR
#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.

Referenced by Exiv2::AsfVideo::decodeBlock(), and Exiv2::Internal::TiffParserWorker::encode().

#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.

Referenced by Exiv2::Converter::cnvExifArray(), Exiv2::Converter::cnvExifComment(), Exiv2::Converter::cnvExifDate(), Exiv2::Converter::cnvExifFlash(), Exiv2::Converter::cnvExifGPSCoord(), Exiv2::Converter::cnvExifValue(), Exiv2::Converter::cnvIptcValue(), Exiv2::Converter::cnvXmpArray(), Exiv2::Converter::cnvXmpComment(), Exiv2::Converter::cnvXmpDate(), Exiv2::Converter::cnvXmpFlash(), Exiv2::Converter::cnvXmpGPSCoord(), Exiv2::Converter::cnvXmpGPSVersion(), Exiv2::Converter::cnvXmpValue(), Exiv2::Converter::cnvXmpValueToIptc(), Exiv2::Converter::cnvXmpVersion(), Exiv2::convertStringCharset(), Exiv2::XmpParser::decode(), Exiv2::IptcParser::decode(), Exiv2::ExifParser::decode(), Exiv2::MatroskaVideo::decodeBlock(), Exiv2::Internal::TiffDecoder::decodeIptc(), Exiv2::Internal::TiffDecoder::decodeXmp(), Exiv2::Internal::TiffBinaryArray::doCount(), Exiv2::XmpParser::encode(), Exiv2::ExifParser::encode(), Exiv2::Internal::TiffEncoder::encodeImageEntry(), Exiv2::EpsImage::EpsImage(), Exiv2::CommentValue::read(), Exiv2::DateValue::read(), Exiv2::TimeValue::read(), Exiv2::JpegBase::readMetadata(), Exiv2::XmpSidecar::readMetadata(), Exiv2::Jp2Image::readMetadata(), Exiv2::Rw2Image::readMetadata(), Exiv2::EpsImage::readMetadata(), Exiv2::Internal::TiffReader::readTiffEntry(), Exiv2::Internal::TiffDataEntry::setStrips(), Exiv2::Internal::TiffImageEntry::setStrips(), Exiv2::FileIo::transfer(), Exiv2::Internal::TiffReader::visitBinaryArray(), Exiv2::Internal::TiffReader::visitDirectory(), Exiv2::Internal::TiffReader::visitSubIfd(), and Exiv2::EpsImage::writeMetadata().