Teuchos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Teuchos_Exceptions.hpp
Go to the documentation of this file.
1// @HEADER
2// ***********************************************************************
3//
4// Teuchos: Common Tools Package
5// Copyright (2004) Sandia Corporation
6//
7// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8// license for use of this work by or on behalf of the U.S. Government.
9//
10// Redistribution and use in source and binary forms, with or without
11// modification, are permitted provided that the following conditions are
12// met:
13//
14// 1. Redistributions of source code must retain the above copyright
15// notice, this list of conditions and the following disclaimer.
16//
17// 2. Redistributions in binary form must reproduce the above copyright
18// notice, this list of conditions and the following disclaimer in the
19// documentation and/or other materials provided with the distribution.
20//
21// 3. Neither the name of the Corporation nor the names of the
22// contributors may be used to endorse or promote products derived from
23// this software without specific prior written permission.
24//
25// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36//
37// Questions? Contact Michael A. Heroux (maherou@sandia.gov)
38//
39// ***********************************************************************
40// @HEADER
41
42
43#ifndef TEUCHOS_EXCEPTIONS_HPP
44#define TEUCHOS_EXCEPTIONS_HPP
45
46
48
49
50namespace Teuchos {
51
52
57class ExceptionBase : public std::logic_error
58{public:ExceptionBase(const std::string& what_arg) : std::logic_error(what_arg) {}};
59// 2007/11/07: rabartl: Above, I had to change the name from Exception to
60// ExceptionBase because Marzio did a 'using namespace Teuchos' and then he
61// declared his own Exception class. The file Laplacian3D.cpp failed to
62// compile. STOP DOING USING NAMESPACE BLAH!!!!!!
63
64
70{public:DuplicateOwningRCPError(const std::string& what_arg) : ExceptionBase(what_arg) {}};
71
72
78{public:NullReferenceError(const std::string& what_arg) : ExceptionBase(what_arg) {}};
79
80
86{public:NonconstAccessError(const std::string& what_arg) : ExceptionBase(what_arg) {}};
87
88
94{public:RangeError(const std::string& what_arg) : ExceptionBase(what_arg) {}};
95
96
102{public:DanglingReferenceError(const std::string& what_arg) : ExceptionBase(what_arg) {}};
103
104
110{public:IncompatibleIteratorsError(const std::string& what_arg) : ExceptionBase(what_arg) {}};
111
119
120public:
121 DuplicateParameterSublist(const std::string& what_arg):
122 ExceptionBase(what_arg){}
123
124};
125
133
134public:
135 DuplicateParameterEntryException(const std::string& what_arg):
136 ExceptionBase(what_arg){}
137
138};
139
146
147public:
148 DuplicateParameterEntryIDException(const std::string& what_arg):
149 ExceptionBase(what_arg){}
150
151};
152
159
160public:
161 DuplicateValidatorIDException(const std::string& what_arg):
162 ExceptionBase(what_arg){}
163
164};
165
166
167} // end namespace Teuchos
168
169
170#endif // TEUCHOS_EXCEPTIONS_HPP
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
Dangling reference error exception class.
DanglingReferenceError(const std::string &what_arg)
Thrown if a duplicate owning RCP is creatd the the same object.
DuplicateOwningRCPError(const std::string &what_arg)
Thrown when a Parameter Entry that is already being tracked is attempted to be inserted again into th...
DuplicateParameterEntryException(const std::string &what_arg)
Thrown when a Parameter Entry ID that is already being used is attempted to be reused again.
DuplicateParameterEntryIDException(const std::string &what_arg)
Optionally thrown when a sublist is set twice by either updateParametersFromXmlFile(),...
DuplicateParameterSublist(const std::string &what_arg)
Thrown when a ParameterEntryValidatorID that is already being used is attempted to be reused again.
DuplicateValidatorIDException(const std::string &what_arg)
Base exception class for Teuchos.
ExceptionBase(const std::string &what_arg)
Incompatiable iterators error exception class.
IncompatibleIteratorsError(const std::string &what_arg)
Null reference error exception class.
NonconstAccessError(const std::string &what_arg)
Null reference error exception class.
NullReferenceError(const std::string &what_arg)
Range error exception class.
RangeError(const std::string &what_arg)