From 0c21a7a0d5b84dc6726462f0fbe51b8c32433262 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Fri, 11 Aug 2006 16:01:56 +0000 Subject: initial commit into repository --- (limited to 'include/midillo/exception.h') diff --git a/include/midillo/exception.h b/include/midillo/exception.h new file mode 100644 index 0000000..fb6da27 --- a/dev/null +++ b/include/midillo/exception.h @@ -0,0 +1,55 @@ +#ifndef __MIDILLO_EXCEPTION_H +#define __MIDILLO_EXCEPTION_H + +#include + +/** + * @file + * @brief midillo specific exceptions + */ + +namespace midillo { + using std::string; + + /** + * Base midillo exception class + */ + class exception : public konforka::exception { + public: + explicit exception(const string& fi,const string& fu,int l,const string& w) + : konforka::exception(fi,fu,l,w) { } + }; + + class exception_io_error : public exception { + public: + explicit exception_io_error(const string& fi,const string& fu,int l,const string& w) + : exception(fi,fu,l,w) { } + }; + + class exception_input_error : public exception_io_error { + public: + explicit exception_input_error(const string& fi,const string& fu,int l,const string& w) + : exception_io_error(fi,fu,l,w) { } + }; + + class exception_invalid_input : public exception_input_error { + public: + explicit exception_invalid_input(const string& fi,const string& fu,int l,const string& w) + : exception_input_error(fi,fu,l,w) { } + }; + + class exception_unexpected_input : public exception_invalid_input { + public: + explicit exception_unexpected_input(const string& fi,const string& fu,int l,const string& w) + : exception_invalid_input(fi,fu,l,w) { } + }; + + class exception_output_error : public exception_io_error { + public: + explicit exception_output_error(const string& fi,const string& fu,int l,const string& w) + : exception_io_error(fi,fu,l,w) { } + }; + +}; + +#endif /* __MIDILLO_EXCEPTION_H */ -- cgit v0.9.0.2