Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Teuchos_CWrapperSupport.cpp
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 "Teuchos_CWrapperSupport_Cpp.hpp"
11#include "Teuchos_VerboseObject.hpp"
12
13
14namespace {
15
16
17Teuchos::RCP<Teuchos::FancyOStream>& printErrorOStreamImpl()
18{
19 static Teuchos::RCP<Teuchos::FancyOStream> printErrorOStream;
20 if (is_null(printErrorOStream)) {
22 }
23 return printErrorOStream;
24}
25
26
27bool& showStackTraceOnExceptionImpl()
28{
29 static bool showStackTraceOnException = false;
30 return showStackTraceOnException;
31}
32
33
34} // namespace
35
36
37namespace Teuchos {
38
39
40//
41// CWrapperErrorHandling
42//
43
44
51
52
57
58
64
65
70
71
72} // namespace Teuchos
static void setShowStackTraceOnException(const bool showStrackTraceOnException)
Set if the stacktrace should be shown on every caught exception.
static bool getShowStackTraceOnException()
Get if the stacktrace should be shown on every caught exception.
Smart reference counting pointer class for automatic garbage collection.
static RCP< FancyOStream > getDefaultOStream()
Get the default output stream object.
static RCP< FancyOStream > getPrintErrorOStream()
Get the ostream that will be printed when errors occur.
static void setPrintErrorOStream(const RCP< FancyOStream > &errorOStream)
Set the ostream that will be printed to when errors occur.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...