Go to the documentation of this file.
18 #ifndef viskores_cont_Error_h
19 #define viskores_cont_Error_h
41 class VISKORES_ALWAYS_EXPORT
Error :
public std::exception
46 const std::string& GetMessage()
const {
return this->Message; }
49 const std::string&
GetStackTrace()
const {
return this->StackTrace; }
56 const std::string& GetMessageA()
const {
return this->Message; }
57 const std::string& GetMessageW()
const {
return this->Message; }
63 const char*
what() const noexcept
override {
return this->What.c_str(); }
73 , What(
"Undescribed error\n" + StackTrace)
74 , IsDeviceIndependent(false)
77 Error(
const std::string& message,
bool is_device_independent =
false)
80 , What(Message +
"\n" + StackTrace)
81 , IsDeviceIndependent(is_device_independent)
87 this->Message = message;
88 this->What = this->Message +
"\n" + this->StackTrace;
102 #endif //viskores_cont_Error_h
bool IsDeviceIndependent
Definition: Error.h:95
std::string What
Definition: Error.h:94
Error()
Definition: Error.h:71
Error(const std::string &message, bool is_device_independent=false)
Definition: Error.h:77
std::string StackTrace
Definition: Error.h:93
Groups connected points that have the same field value.
Definition: Atomic.h:27
std::string GetStackTrace(viskores::Int32 skip=0)
Returns a stacktrace on supported platforms.
#define VISKORES_SILENCE_WEAK_VTABLE_WARNING_END
Definition: ExportMacros.h:128
void SetMessage(const std::string &message)
Definition: Error.h:85
#define VISKORES_SILENCE_WEAK_VTABLE_WARNING_START
Definition: ExportMacros.h:127
const char * what() const noexcept override
Returns the message for the error and the stack trace for it.
Definition: Error.h:63
std::string Message
Definition: Error.h:92
bool GetIsDeviceIndependent() const
Returns true if this exception is device independent.
Definition: Error.h:68
The superclass of all exceptions thrown by any Viskores function or method.
Definition: Error.h:41