Teuchos_StandardCatchMacros.hpp File Reference

#include "Teuchos_GlobalMPISession.hpp"
#include "Teuchos_FancyOStream.hpp"
#include "Teuchos_TypeNameTraits.hpp"

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.

Defines

#define TEUCHOS_STANDARD_CATCH_STATEMENTS(VERBOSE, ERR_STREAM, SUCCESS_FLAG)
 Simple macro that catches and reports standard exceptions and other exceptions.


Define Documentation

#define TEUCHOS_STANDARD_CATCH_STATEMENTS ( VERBOSE,
ERR_STREAM,
SUCCESS_FLAG   ) 

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 ? 0 : 1 );
 }

Definition at line 57 of file Teuchos_StandardCatchMacros.hpp.


Generated on Wed Jul 22 13:00:03 2009 for Teuchos Package Browser (Single Doxygen Collection) by doxygen 1.5.8