Zoltan2
|
Defines exception handling macros. More...
#include <stdexcept>
#include <iostream>
#include <sstream>
#include <string>
Go to the source code of this file.
Classes | |
class | Zoltan2::NotImplemented |
Exception thrown when a called base-class method is not implemented. More... | |
Namespaces | |
Zoltan2 | |
Created by mbenlioglu on Aug 31, 2020. | |
Macros | |
#define | Z2_THROW_OUTSIDE_ERROR(env) |
Throw an error returned from outside the Zoltan2 library. More... | |
#define | Z2_THROW_NOT_IMPLEMENTED { throw Zoltan2::NotImplemented(__FILE__, __LINE__, __func__zoltan2__); } |
#define | Z2_FORWARD_EXCEPTIONS |
Forward an exception back through call stack. More... | |
#define | Z2_THROW_EXPERIMENTAL(mystr) |
Throw an error when experimental code is requested but not compiled. More... | |
#define | Z2_THROW_EXPERIMENTAL_WOLF(mystr) |
Throw an error when wolf experimental code is requested but not compiled. More... | |
#define | Z2_THROW_SERIAL(mystr) |
Throw an error when code is run on more than one processor. More... | |
#define | Z2_ASSERT_VALUE(actual, expected) |
Throw an error when actual value is not equal to expected value. More... | |
#define | __func__zoltan2__ __func__ |
Defines exception handling macros.
Definition in file Zoltan2_Exceptions.hpp.
#define Z2_THROW_OUTSIDE_ERROR | ( | env | ) |
Throw an error returned from outside the Zoltan2 library.
A try
block that calls another library should be followed by this catch
block. The error message if any is printed and the exception is then thrown.
Definition at line 28 of file Zoltan2_Exceptions.hpp.
#define Z2_THROW_NOT_IMPLEMENTED { throw Zoltan2::NotImplemented(__FILE__, __LINE__, __func__zoltan2__); } |
Definition at line 56 of file Zoltan2_Exceptions.hpp.
#define Z2_FORWARD_EXCEPTIONS |
Forward an exception back through call stack.
A try
block that calls another Zoltan2 function should be followed by this catch
series. It ensures that the original runtime, logic or bad_alloc exception gets passed up. For example, if a runtime_error is caught as a std::exception, it gets passed up as a std::exception and the what()
message is not lost.
Definition at line 70 of file Zoltan2_Exceptions.hpp.
#define Z2_THROW_EXPERIMENTAL | ( | mystr | ) |
Throw an error when experimental code is requested but not compiled.
Experimental code must be enabled with CMAKE Option -D Zoltan2_ENABLE_Experimental:BOOL=ON If it is not enabled but it is called, throw an exception. The input string mystr is a use-specific message included in the throw message.
Definition at line 85 of file Zoltan2_Exceptions.hpp.
#define Z2_THROW_EXPERIMENTAL_WOLF | ( | mystr | ) |
Throw an error when wolf experimental code is requested but not compiled.
Experimental code must be enabled with CMAKE Option -D Zoltan2_ENABLE_Experimental_Wolf:BOOL=ON If it is not enabled but it is called, throw an exception. The input string mystr is a use-specific message included in the throw message.
Definition at line 104 of file Zoltan2_Exceptions.hpp.
#define Z2_THROW_SERIAL | ( | mystr | ) |
Throw an error when code is run on more than one processor.
Definition at line 118 of file Zoltan2_Exceptions.hpp.
#define Z2_ASSERT_VALUE | ( | actual, | |
expected | |||
) |
Throw an error when actual value is not equal to expected value.
Check if the two arguments passed are equal and throw a runtime error if they are not.
Definition at line 134 of file Zoltan2_Exceptions.hpp.
#define __func__zoltan2__ __func__ |
Definition at line 153 of file Zoltan2_Exceptions.hpp.