charon-core  0.3.1
ExceptionHandler.h
Go to the documentation of this file.
1 /* This file is part of Charon.
2 
3  Charon is free software: you can redistribute it and/or modify
4  it under the terms of the GNU Lesser General Public License as published by
5  the Free Software Foundation, either version 3 of the License, or
6  (at your option) any later version.
7 
8  Charon is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU Lesser General Public License for more details.
12 
13  You should have received a copy of the GNU Lesser General Public License
14  along with Charon. If not, see <http://www.gnu.org/licenses/>.
15 */
22 #ifndef EXCEPTIONHANDLER_H
23 #define EXCEPTIONHANDLER_H
24 
25 #include <charon-core/DllEx.h>
26 
28 namespace ExceptionHandler {
30 
37  charon_plugins_DLL_PUBLIC int run(int (&method)());
38 
40 
47  charon_plugins_DLL_PUBLIC int run(void (&method)());
48 
50 
54  charon_plugins_DLL_PUBLIC int checkRaise(void (&method)());
55 }
56 
57 #endif // EXCEPTIONHANDLER_H
charon_plugins_DLL_PUBLIC int checkRaise(void(&method)())
execute given function and return EXIT_SUCCESS on exception catch
Dynamic library API import/export prprocessor macros.
#define charon_plugins_DLL_PUBLIC
Preprocessor macro to define this class/function as public visible, i.e.
Definition: DllEx.h:83
charon_plugins_DLL_PUBLIC int run(int(&method)())
Execute given function and catch exceptions.