00001 #ifndef _theplu_yat_utility_exception_
00002 #define _theplu_yat_utility_exception_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <stdexcept>
00026 #include <string>
00027
00028 #include <gsl/gsl_errno.h>
00029
00030 namespace theplu {
00031 namespace yat {
00032 namespace utility {
00033
00037 class cmd_error : public std::runtime_error
00038 {
00039 public:
00045 inline cmd_error(std::string message)
00046 : std::runtime_error(message) {}
00047 };
00048
00049
00056 class GSL_error : public std::runtime_error
00057 {
00058 public:
00062 inline GSL_error(std::string message) throw()
00063 : std::runtime_error("GSL_error: " + message) {}
00064
00069 inline GSL_error(std::string message, int gsl_status) throw()
00070 : std::runtime_error("GSL_error: " + message + " " +
00071 gsl_strerror(gsl_status)) {}
00072 };
00073
00074
00081 class IO_error : public std::runtime_error
00082 {
00083 public:
00087 inline IO_error(std::string message) throw()
00088 : std::runtime_error("IO_error: " + message) {}
00089 };
00090
00091 }}}
00092
00093 #endif