Teuchos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Teuchos_StandardCatchMacros.hpp File Reference
Include dependency graph for Teuchos_StandardCatchMacros.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TEUCHOS_GET_STORED_STACKTRACE()
#define TEUCHOS_STANDARD_CATCH_STATEMENTS_IMPL(VERBOSE, ERR_STREAM, SHOW_STACK_TRACE, SUCCESS_FLAG)
 Implementation of TEUCHOS_STANDARD_CATCH_STATEMENTS(...) that allows toggle of showing stack trace.
#define TEUCHOS_STANDARD_CATCH_STATEMENTS(VERBOSE, ERR_STREAM, SUCCESS_FLAG)
 Simple macro that catches and reports standard exceptions and other exceptions.

Macro Definition Documentation

◆ TEUCHOS_GET_STORED_STACKTRACE

#define TEUCHOS_GET_STORED_STACKTRACE ( )
Value:
""

Definition at line 58 of file Teuchos_StandardCatchMacros.hpp.

◆ TEUCHOS_STANDARD_CATCH_STATEMENTS_IMPL

#define TEUCHOS_STANDARD_CATCH_STATEMENTS_IMPL ( VERBOSE,
ERR_STREAM,
SHOW_STACK_TRACE,
SUCCESS_FLAG )

Implementation of TEUCHOS_STANDARD_CATCH_STATEMENTS(...) that allows toggle of showing stack trace.

Definition at line 65 of file Teuchos_StandardCatchMacros.hpp.

◆ TEUCHOS_STANDARD_CATCH_STATEMENTS

#define TEUCHOS_STANDARD_CATCH_STATEMENTS ( VERBOSE,
ERR_STREAM,
SUCCESS_FLAG )
Value:
TEUCHOS_STANDARD_CATCH_STATEMENTS_IMPL(VERBOSE, ERR_STREAM, true, SUCCESS_FLAG)
#define TEUCHOS_STANDARD_CATCH_STATEMENTS_IMPL(VERBOSE, ERR_STREAM, SHOW_STACK_TRACE, SUCCESS_FLAG)
Implementation of TEUCHOS_STANDARD_CATCH_STATEMENTS(...) that allows toggle of showing stack trace.

Simple macro that catches and reports standard exceptions and other exceptions.

This macro should be used to write simple main() program functions wrapped in a try statement as:

int main(...)
{
bool verbose = true;
bool success = true;
try {
...
}
TEUCHOS_STANDARD_CATCH_STATEMENTS(verbose, std::cerr, success);
return ( success ? EXIT_SUCCESS : EXIT_FAILURE );
}
#define TEUCHOS_STANDARD_CATCH_STATEMENTS(VERBOSE, ERR_STREAM, SUCCESS_FLAG)
Simple macro that catches and reports standard exceptions and other exceptions.
int main()
Definition evilMain.cpp:75

NOTE: This macro will print out stacktraces generated by exceptions thrown with the TEUCHOS_TEST_FOR_EXCEPTION() family of macros (see the main doc page for details).

Definition at line 136 of file Teuchos_StandardCatchMacros.hpp.