From 5a41152dbb5095408536a7f89a28102f4b7c9b6b Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Mon, 15 Nov 2010 17:52:42 +0100 Subject: [PATCH] Make stuff to throw childs of runtime_error --- src/logging.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/logging.h b/src/logging.h index 999b43f3..3d45a2b8 100644 --- a/src/logging.h +++ b/src/logging.h @@ -31,11 +31,19 @@ #define _LOGGING_H #include +#include #include "i18n.h" #include "mail.h" -class fork_throw {}; -class unknown_arg_throw {}; +class fork_throw : public std::runtime_error { +public: + fork_throw() : std::runtime_error("Fork happened") {} +}; + +class unknown_arg_throw : public std::runtime_error { +public: + unknown_arg_throw() : std::runtime_error("Unknown argumunt given") {} +}; void clean_up(void *memtofree1, void* memtofree2); void clean_up_without_threads(void *memtofree1, void* memtofree2);