43#ifndef TEUCHOS_C_WRAPPER_SUPPORT_CPP_HPP
44#define TEUCHOS_C_WRAPPER_SUPPORT_CPP_HPP
98#define TEUCHOS_CWRAPPER_TRY(IERR) \
99 TEUCHOS_TEST_FOR_EXCEPT((IERR) == 0); \
101 bool cwrapper_try_success = true; \
111#define TEUCHOS_CWRAPPER_CATCH_ERROR_CODE(IERR) \
112 TEUCHOS_STANDARD_CATCH_STATEMENTS_IMPL( \
113 true, *Teuchos::CWrapperErrorHandling::getPrintErrorOStream(), \
114 Teuchos::CWrapperErrorHandling::getShowStackTraceOnException(), \
115 cwrapper_try_success ); \
116 if (!cwrapper_try_success) { (*(IERR)) = -1; }
128#define TEUCHOS_CWRAPPER_SET_ERROR_CODE(IERR, IERR_VALUE) \
130 (*(IERR)) = (IERR_VALUE); \
#define TEUCHOSCORE_LIB_DLL_EXPORT
Static C Wrapper Error Handling Policy Class.
static void setShowStackTraceOnException(const bool showStrackTraceOnException)
Set if the stacktrace should be shown on every caught exception.
static bool getShowStackTraceOnException()
Get if the stacktrace should be shown on every caught exception.
Smart reference counting pointer class for automatic garbage collection.
static RCP< FancyOStream > getPrintErrorOStream()
Get the ostream that will be printed when errors occur.
static void setPrintErrorOStream(const RCP< FancyOStream > &errorOStream)
Set the ostream that will be printed to when errors occur.