Teuchos - Trilinos Tools Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions
.

Macros

#define TEUCHOS_CWRAPPER_TRY(IERR)
 Define a try block. More...
 
#define TEUCHOS_CWRAPPER_CATCH_ERROR_CODE(IERR)
 Define the catch blocks and set the error code. More...
 
#define TEUCHOS_CWRAPPER_SET_ERROR_CODE(IERR, IERR_VALUE)
 Set the error code. More...
 

Functions

static void Teuchos::CWrapperErrorHandling::setPrintErrorOStream (const RCP< FancyOStream > &errorOStream)
 Set the ostream that will be printed to when errors occur. More...
 
static RCP< FancyOStream > Teuchos::CWrapperErrorHandling::getPrintErrorOStream ()
 Get the ostream that will be printed when errors occur. More...
 

Detailed Description

Macro Definition Documentation

#define TEUCHOS_CWRAPPER_TRY (   IERR)
Value:
TEUCHOS_TEST_FOR_EXCEPT((IERR) == 0); \
(*(IERR)) = 0; \
bool cwrapper_try_success = true; \
try
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
This macro is designed to be a short version of TEUCHOS_TEST_FOR_EXCEPTION() that is easier to call...

Define a try block.

Definition at line 65 of file Teuchos_CWrapperSupport_Cpp.hpp.

#define TEUCHOS_CWRAPPER_CATCH_ERROR_CODE (   IERR)
Value:
TEUCHOS_STANDARD_CATCH_STATEMENTS_IMPL( \
cwrapper_try_success ); \
if (!cwrapper_try_success) { (*(IERR)) = -1; }
static RCP< FancyOStream > getPrintErrorOStream()
Get the ostream that will be printed when errors occur.
static bool getShowStackTraceOnException()
Get if the stacktrace should be shown on every caught exception.

Define the catch blocks and set the error code.

Definition at line 78 of file Teuchos_CWrapperSupport_Cpp.hpp.

#define TEUCHOS_CWRAPPER_SET_ERROR_CODE (   IERR,
  IERR_VALUE 
)
Value:
if ((IERR)) { \
(*(IERR)) = (IERR_VALUE); \
}

Set the error code.

This function is to be used inside of the try/catch blocks to set the error code.

Definition at line 95 of file Teuchos_CWrapperSupport_Cpp.hpp.

Function Documentation

void Teuchos::CWrapperErrorHandling::setPrintErrorOStream ( const RCP< FancyOStream > &  errorOStream)
static

Set the ostream that will be printed to when errors occur.

Definition at line 45 of file Teuchos_CWrapperSupport.cpp.

RCP< FancyOStream > Teuchos::CWrapperErrorHandling::getPrintErrorOStream ( )
static

Get the ostream that will be printed when errors occur.

Definition at line 53 of file Teuchos_CWrapperSupport.cpp.