CatchConfig.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  tag: Matthias Goldhoorn Fri Oct 18 10:00:05 CEST 2013 Config.hpp
3 
4  CatchConfig.hpp - description
5  -------------------
6  begin : Fri Oct 18 10:00:05 CEST 2013
7  copyright : (C) 2013 Matthias Goldhoorn
8  email : matthias@goldhoorn.eu
9 
10  ***************************************************************************
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU General Public *
13  * License as published by the Free Software Foundation; *
14  * version 2 of the License. *
15  * *
16  * As a special exception, you may use this file as part of a free *
17  * software library without restriction. Specifically, if other files *
18  * instantiate templates or use macros or inline functions from this *
19  * file, or you compile this file and link it with other files to *
20  * produce an executable, this file does not by itself cause the *
21  * resulting executable to be covered by the GNU General Public *
22  * License. This exception does not however invalidate any other *
23  * reasons why the executable file might be covered by the GNU General *
24  * Public License. *
25  * *
26  * This library is distributed in the hope that it will be useful, *
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
29  * Lesser General Public License for more details. *
30  * *
31  * You should have received a copy of the GNU General Public *
32  * License along with this library; if not, write to the Free Software *
33  * Foundation, Inc., 59 Temple Place, *
34  * Suite 330, Boston, MA 02111-1307 USA *
35  * *
36  ***************************************************************************/
37 
38 #ifndef ORO_CATCHCONFIG_HPP
39 #define ORO_CATCHCONFIG_HPP
40 
41 #include <stdlib.h>
42 
55 #if !defined(ORO_EMBEDDED)
56 # define TRY(C) if(::RTT::internal::catch_exception()){C} else try{C}
57 # define CATCH(T,C) catch(T){C}
58 # define CATCH_ALL(C) catch(...){C}
59 #else //Exceptions are not availible at all
60 # define TRY(C) C
61 # define CATCH(T,C)
62 # define CATCH_ALL(C)
63 #endif
64 
65 namespace RTT{
66  namespace internal {
67  extern int m_catch_exception;
68  inline bool catch_exception(){
69  if(m_catch_exception == -1){
70  if(getenv("RTT_IGNORE_EXCEPTION")){
71  m_catch_exception = 1;
72  }else{
73  m_catch_exception = 0;
74  }
75  }
76  return (bool)m_catch_exception;
77  }
78  }
79 }
80 
81 #endif
bool catch_exception()
Definition: CatchConfig.hpp:68
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Definition: Activity.cpp:53


rtt
Author(s): RTT Developers
autogenerated on Tue Jun 25 2019 19:33:21