Teuchos Package Browser (Single Doxygen Collection) Version of the Day
Defines | Functions
Teuchos_TestForException.hpp File Reference

Macro for throwing an exception with breakpointing to ease debugging. More...

#include "Teuchos_TypeNameTraits.hpp"
#include "Teuchos_stacktrace.hpp"
Include dependency graph for Teuchos_TestForException.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define TEUCHOS_STORE_STACKTRACE()
#define TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
 Macro for throwing an exception with breakpointing to ease debugging.
#define TEST_FOR_EXCEPTION_CLASS_FUNC(throw_exception_test, Exception, msg)
 Macro for throwing an exception from within a class method with breakpointing to ease debugging.
#define TEST_FOR_EXCEPTION_PURE_MSG(throw_exception_test, Exception, msg)
 Macro for throwing an exception with breakpointing to ease debugging.
#define TEST_FOR_EXCEPT(throw_exception_test)   TEST_FOR_EXCEPTION(throw_exception_test, std::logic_error, "Error!")
 This macro is designed to be a short version of TEST_FOR_EXCEPTION() that is easier to call.
#define TEST_FOR_EXCEPT_MSG(throw_exception_test, msg)   TEST_FOR_EXCEPTION(throw_exception_test, std::logic_error, msg)
 This macro is designed to be a short version of TEST_FOR_EXCEPTION() that is easier to call.
#define TEST_FOR_EXCEPTION_PRINT(throw_exception_test, Exception, msg, out_ptr)
 This macro is the same as TEST_FOR_EXCEPTION() except that the exception will be caught, the message printed, and then rethrown.
#define TEST_FOR_EXCEPT_PRINT(throw_exception_test, out_ptr)   TEST_FOR_EXCEPTION_PRINT(throw_exception_test, std::logic_error, "Error!", out_ptr)
 This macro is the same as TEST_FOR_EXCEPT() except that the exception will be caught, the message printed, and then rethrown.
#define TEUCHOS_TRACE(exc)
 This macro intercepts an exception, prints a standardized message including the current filename and line number, and then throws the exception up the stack.

Functions

TEUCHOS_LIB_DLL_EXPORT void TestForException_incrThrowNumber ()
 Increment the throw number.
TEUCHOS_LIB_DLL_EXPORT int TestForException_getThrowNumber ()
 Increment the throw number.
TEUCHOS_LIB_DLL_EXPORT void TestForException_break (const std::string &msg)
 The only purpose for this function is to set a breakpoint.
TEUCHOS_LIB_DLL_EXPORT void TestForException_setEnableStacktrace (bool enableStrackTrace)
 Set at runtime if stacktracing functionality is enabled when * exceptions are thrown.
TEUCHOS_LIB_DLL_EXPORT bool TestForException_getEnableStacktrace ()
 Get at runtime if stacktracing functionality is enabled when exceptions are thrown.

Detailed Description

Macro for throwing an exception with breakpointing to ease debugging.

Definition in file Teuchos_TestForException.hpp.


Define Documentation

#define TEUCHOS_STORE_STACKTRACE ( )

Definition at line 80 of file Teuchos_TestForException.hpp.


Function Documentation

TEUCHOS_LIB_DLL_EXPORT bool TestForException_getEnableStacktrace ( )

Get at runtime if stacktracing functionality is enabled when exceptions are thrown.

Definition at line 102 of file Teuchos_TestForException.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines