1
/* This file is part of Charon.
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.
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.
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/>.
16
/** @file ExceptionHandler.h
17
* Declaration of class WorkflowExecutor
18
* @author <a href="mailto:jmgottfried@web.de">Jens-Malte Gottfried</a>
22
#ifndef EXCEPTIONHANDLER_H
23
#define EXCEPTIONHANDLER_H
25
/// Routine to simplify exception handling during workflow executions.
26
namespace ExceptionHandler {
27
/// Execute given function and catch exceptions.
28
/** Exceptions are caught, error messages are printed to std::cerr.
29
* Exception type is given in error message, on gcc, typename
30
* demangling is performed.
31
* You may use this as return value of the main() routine.
32
* \returns return value of the given function
34
int run(int (&method)() /**[in] execution routine*/);
37
#endif // EXCEPTIONHANDLER_H