# Exiv2::AnyError Class Reference

Error class interface. Allows the definition and use of a hierarchy of error classes which can all be handled in one catch block. More...

`#include <error.hpp>`

Inheritance diagram for Exiv2::AnyError:

[legend]
List of all members.

## Public Member Functions

Creators
virtual | ~AnyError ()
| Virtual destructor.
Accessors
virtual int | code () const =0
| Return the error code.
virtual std::string | what () const =0
| Return the error message. Consider using the output operator operator<<(std::ostream &os, const AnyError& error) instead.

## Detailed Description

Error class interface. Allows the definition and use of a hierarchy of error classes which can all be handled in one catch block.

Examples:

  addmoddel.cpp, exifcomment.cpp, exifprint.cpp, iptceasy.cpp, and iptcprint.cpp.

## Member Function Documentation

virtual std::string Exiv2::AnyError::what | ( |  | ) | const`[pure virtual]`

Return the error message. Consider using the output operator operator<<(std::ostream &os, const AnyError& error) instead.

Note:
  Unlike std::exception::what(), this function returns an std::string.

Implemented in Exiv2::Error.

The documentation for this class was generated from the following file:

- error.hpp