#include <exception>
#include <Teuchos_Exceptions.hpp>
#include <Teuchos_Assert.hpp>
#include "Xpetra_ConfigDefs.hpp"
Go to the source code of this file.
|
| #define | XPETRA_COMMA , |
| #define | XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg) |
| #define | XPETRA_RCP_DYNAMIC_CAST(type, obj, newObj, exceptionMsg) |
| #define | XPETRA_FACTORY_ERROR_IF_EPETRA(lib) |
| #define | XPETRA_FACTORY_END TEUCHOS_TEST_FOR_EXCEPTION(1, ::Xpetra::Exceptions::BadCast, "Unknown map->lib() type. Did you compile with Epetra and Tpetra support?"); |
| #define | XPETRA_TPETRA_ETI_EXCEPTION(cl, obj, go, node) |
◆ XPETRA_COMMA
◆ XPETRA_DYNAMIC_CAST
| #define XPETRA_DYNAMIC_CAST |
( |
| type, |
|
|
| obj, |
|
|
| newObj, |
|
|
| exceptionMsg ) |
Value: type* newObj##_pt = dynamic_cast<type*>(&obj); \
TEUCHOS_TEST_FOR_EXCEPTION(newObj##_pt == NULL,
Xpetra::Exceptions::BadCast,
"Cannot cast '" #obj
"' to a " #type
". " #exceptionMsg); \
type& newObj = *newObj##_pt;
Exception indicating invalid cast attempted.
Definition at line 22 of file Xpetra_Exceptions.hpp.
◆ XPETRA_RCP_DYNAMIC_CAST
| #define XPETRA_RCP_DYNAMIC_CAST |
( |
| type, |
|
|
| obj, |
|
|
| newObj, |
|
|
| exceptionMsg ) |
Value: const RCP<type>& newObj = Teuchos::rcp_dynamic_cast<type>(obj); \
TEUCHOS_TEST_FOR_EXCEPTION(newObj == Teuchos::null,
Xpetra::Exceptions::BadCast,
"Cannot cast '" #obj
"' to a " #type
". " #exceptionMsg);
Definition at line 29 of file Xpetra_Exceptions.hpp.
◆ XPETRA_FACTORY_ERROR_IF_EPETRA
| #define XPETRA_FACTORY_ERROR_IF_EPETRA |
( |
| lib | ) |
|
◆ XPETRA_FACTORY_END
◆ XPETRA_TPETRA_ETI_EXCEPTION
| #define XPETRA_TPETRA_ETI_EXCEPTION |
( |
| cl, |
|
|
| obj, |
|
|
| go, |
|
|
| node ) |
Value:TEUCHOS_TEST_FOR_EXCEPTION(1,
::Xpetra::Exceptions::BadCast,
"Problem in " #cl
"! Cannot create new object " #obj
" with GO=" #go
" and NO=" #node
". Xpetra has been compiled with Tpetra enabled but GO=" #go
" disabled and/or NO=" #node
" disabled. Please check your Trilinos configuration.");
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Definition at line 43 of file Xpetra_Exceptions.hpp.