Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SimpleThrowFunctions.cpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Teuchos: Common Tools Package
4 //
5 // Copyright 2004 NTESS and the Teuchos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #include "SimpleThrowFunctions.hpp"
11 #include "Teuchos_Assert.hpp"
12 
13 
14 void func_a()
15 {
16  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "This is an exception I throw!");
17 }
18 
19 
20 void func_b()
21 {
22  func_a();
23 }
void func_a()
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
void func_b()