Teuchos - Trilinos Tools Package Version of the Day
Namespaces | Defines | Functions
Teuchos_TestForException.hpp File Reference

Standard test and throw macros. More...

#include "Teuchos_TypeNameTraits.hpp"
#include "Teuchos_stacktrace.hpp"

Go to the source code of this file.

Namespaces

namespace  Teuchos
 

The Teuchos namespace contains all of the classes, structs and enums used by Teuchos, as well as a number of utility routines.


Defines

#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
 Macro for throwing an exception with breakpointing to ease debugging.
#define TEUCHOS_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 TEUCHOS_TEST_FOR_EXCEPTION_PURE_MSG(throw_exception_test, Exception, msg)
 Macro for throwing an exception with breakpointing to ease debugging.
#define TEUCHOS_TEST_FOR_EXCEPTION_PRINT(throw_exception_test, Exception, msg, out_ptr)
 This macro is the same as TEUCHOS_TEST_FOR_EXCEPTION() except that the exception will be caught, the message printed, and then rethrown.
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)   TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, std::logic_error, "Error!")
 This macro is designed to be a short version of TEUCHOS_TEST_FOR_EXCEPTION() that is easier to call.
#define TEUCHOS_TEST_FOR_EXCEPT_MSG(throw_exception_test, msg)   TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, std::logic_error, msg)
 This macro is designed to be a short version of TEUCHOS_TEST_FOR_EXCEPTION() that is easier to call.
#define TEUCHOS_TEST_FOR_EXCEPT_PRINT(throw_exception_test, out_ptr)   TEUCHOS_TEST_FOR_EXCEPTION_PRINT(throw_exception_test, std::logic_error, "Error!", out_ptr)
 This macro is the same as TEUCHOS_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 Teuchos::TestForException_incrThrowNumber ()
 Increment the throw number.
TEUCHOS_LIB_DLL_EXPORT int Teuchos::TestForException_getThrowNumber ()
 Increment the throw number.
TEUCHOS_LIB_DLL_EXPORT void Teuchos::TestForException_break (const std::string &msg)
 The only purpose for this function is to set a breakpoint.
TEUCHOS_LIB_DLL_EXPORT void Teuchos::TestForException_setEnableStacktrace (bool enableStrackTrace)
 Set at runtime if stacktracing functionality is enabled when * exceptions are thrown.
TEUCHOS_LIB_DLL_EXPORT bool Teuchos::TestForException_getEnableStacktrace ()
 Get at runtime if stacktracing functionality is enabled when exceptions are thrown.

Detailed Description

Standard test and throw macros.

Definition in file Teuchos_TestForException.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines