1 2 3 4 5 6 7 8 9 10 11 12 13
#include <exception.h> #include <cerrno> #include <cstring> using namespace newsbeuter; exception::exception(unsigned int error_code) : ecode(error_code) { } exception::~exception() throw() { } const char * exception::what() const throw() { return std::strerror(ecode); }