MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu_Exceptions.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// MueLu: A package for multigrid based preconditioning
4//
5// Copyright 2012 NTESS and the MueLu contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef MUELU_EXCEPTIONS_HPP
11#define MUELU_EXCEPTIONS_HPP
12
13#include <Teuchos_Exceptions.hpp>
14
15#include "MueLu_ConfigDefs.hpp"
16
17namespace MueLu {
18namespace Exceptions {
19
21class BadCast : public Teuchos::ExceptionBase {
22 public:
23 BadCast(const std::string& what_arg);
24 ~BadCast();
25};
26
28
29class NotImplemented : public Teuchos::ExceptionBase {
30 public:
31 NotImplemented(const std::string& what_arg);
33};
34
36class RuntimeError : public Teuchos::ExceptionBase {
37 public:
38 RuntimeError(const std::string& what_arg);
40};
41
43class Overflow : public Teuchos::ExceptionBase {
44 public:
45 Overflow(const std::string& what_arg);
46 ~Overflow();
47};
48
50class Incompatible : public Teuchos::ExceptionBase {
51 public:
52 Incompatible(const std::string& what_arg);
54};
55
57class DependencyError : public Teuchos::ExceptionBase {
58 public:
59 DependencyError(const std::string& what_arg);
61};
62
64class InvalidArgument : public Teuchos::ExceptionBase {
65 public:
66 InvalidArgument(const std::string& what_arg);
68};
69
70} // namespace Exceptions
71} // namespace MueLu
72
73#define MUELU_TPETRA_ETI_EXCEPTION(cl, obj, go) TEUCHOS_TEST_FOR_EXCEPTION(1, ::MueLu::Exceptions::BadCast, "Problem in " #cl "! Cannot create new object " #obj " with GO=" #go ". MueLu has been compiled with Tpetra enabled bug GO!=" #go ". Please add TPETRA_INST_INT_INT to your configuration.");
74
75#endif // ifndef MUELU_EXCEPTIONS_HPP
Exception indicating invalid cast attempted.
Exception throws to report data dependency problems between factories.
Exception throws to report incompatible objects (like maps).
Exception throws to report invalid user entry.
Exception throws when you call an unimplemented method of MueLu.
Exception throws to report overflows.
Exception throws to report errors in the internal logical of the program.
Namespace for MueLu classes and methods.