10#ifndef TEUCHOS_C_WRAPPER_SUPPORT_CPP_HPP
11#define TEUCHOS_C_WRAPPER_SUPPORT_CPP_HPP
14#include "Teuchos_StandardCatchMacros.hpp"
15#include "Teuchos_FancyOStream.hpp"
65#define TEUCHOS_CWRAPPER_TRY(IERR) \
66 TEUCHOS_TEST_FOR_EXCEPT((IERR) == 0); \
68 bool cwrapper_try_success = true; \
78#define TEUCHOS_CWRAPPER_CATCH_ERROR_CODE(IERR) \
79 TEUCHOS_STANDARD_CATCH_STATEMENTS_IMPL( \
80 true, *Teuchos::CWrapperErrorHandling::getPrintErrorOStream(), \
81 Teuchos::CWrapperErrorHandling::getShowStackTraceOnException(), \
82 cwrapper_try_success ); \
83 if (!cwrapper_try_success) { (*(IERR)) = -1; }
95#define TEUCHOS_CWRAPPER_SET_ERROR_CODE(IERR, IERR_VALUE) \
97 (*(IERR)) = (IERR_VALUE); \
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.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...