00001 // Copyright (C) Calum Grant 2008 00002 00003 namespace dynamic 00004 { 00005 #pragma warning(push) 00006 #pragma warning(disable:4275) 00007 00009 00010 class DYNAMIC_API exception : public std::runtime_error, public var 00011 { 00012 public: 00013 exception(); 00014 exception(const char * class_name); 00015 exception(const char * class_name, const var & message); 00016 exception(const char * class_name, const var & message, const var & extra); 00017 ~exception() throw(); 00018 }; 00019 00020 #pragma warning(pop) 00021 00023 00024 DYNAMIC_API var exception_description(const var & ex); 00025 00026 00028 00029 class DYNAMIC_API not_found : public exception 00030 { 00031 public: 00032 not_found(var const &); 00033 ~not_found() throw(); 00034 }; 00035 00036 00038 00039 class DYNAMIC_API not_supported : public exception 00040 { 00041 public: 00042 not_supported(const var & object, const std::string & operation); 00043 not_supported(var_impl * object, const std::string & operation); 00044 ~not_supported() throw(); 00045 }; 00046 00047 00049 00050 class DYNAMIC_API wrong_number_of_args : public exception 00051 { 00052 public: 00053 wrong_number_of_args(int expected, int actual); 00054 ~wrong_number_of_args() throw(); 00055 }; 00056 00057 00059 00060 class DYNAMIC_API too_many_arguments : public exception 00061 { 00062 public: 00063 too_many_arguments(); 00064 ~too_many_arguments() throw(); 00065 }; 00066 00067 00069 00070 class DYNAMIC_API invalid_string : public exception 00071 { 00072 public: 00073 invalid_string(); 00074 ~invalid_string() throw(); 00075 }; 00076 00077 00079 00083 class DYNAMIC_API expired_iterator : public exception 00084 { 00085 public: 00086 expired_iterator(); 00087 ~expired_iterator() throw(); 00088 }; 00089 }
1.5.7.1