bad_dispatcher.h
Go to the documentation of this file.00001 #ifndef _SIGX_BAD_DISPATCHER_HPP_
00002 #define _SIGX_BAD_DISPATCHER_HPP_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include <exception>
00024
00025
00026 namespace sigx
00027 {
00028
00029 class bad_dispatcher: public std::exception
00030 {
00031 public:
00032 bad_dispatcher(): std::exception()
00033 {}
00034
00035
00036 virtual const char* what() const throw();
00037 };
00038
00039
00043 template<typename T_return>
00044 struct bad_dispatcher_catcher
00045 {
00046 T_return operator ()() const
00047 {
00048 try
00049 { throw; }
00050 catch (const ::sigx::bad_dispatcher&)
00051 {}
00052 return T_return();
00053 }
00054 };
00055
00056
00057 }
00058
00059
00060 #endif // end file guard