25 #ifndef COMMON_ERROR_H 26 #define COMMON_ERROR_H 38 typedef std::stack<UString>
Stack;
47 void add(const
std::exception &e);
49 const
char *
what() const throw();
85 #endif // COMMON_ERROR_H void add(const char *s,...) GCC_PRINTF(2
A class holding an UTF-8 string.
Exception that provides a stack of explanations.
void exceptionDispatcherWarning(const char *s,...)
Exception dispatcher that prints the exception as a warning, and adds another reason on top...
std::stack< UString > Stack
const Exception kWriteError("Write error")
Exception when writing to a stream failed.
const Exception kReadError("Read error")
Exception when reading from a stream failed.
void exceptionDispatcherError(const char *s,...)
Exception dispatcher that prints the exception as an error, and adds another reason on top...
const Exception kSeekError("Seek error")
Exception when seeking a stream failed.
const Exception kOpenError("Can't open file")
Exception when a file couldn't be opened.
const char * what() const
void printException(Exception &e, const UString &prefix)
Print a whole exception stack to stderr and the log.