Go to the documentation of this file.
10 #ifndef vtk_m_cont_Error_h
11 #define vtk_m_cont_Error_h
38 const std::string& GetMessage()
const {
return this->Message; }
41 const std::string&
GetStackTrace()
const {
return this->StackTrace; }
48 const std::string& GetMessageA()
const {
return this->Message; }
49 const std::string& GetMessageW()
const {
return this->Message; }
55 const char*
what() const noexcept
override {
return this->What.c_str(); }
65 , What(
"Undescribed error\n" + StackTrace)
66 , IsDeviceIndependent(false)
69 Error(
const std::string& message,
bool is_device_independent =
false)
72 , What(Message +
"\n" + StackTrace)
73 , IsDeviceIndependent(is_device_independent)
79 this->Message = message;
80 this->What = this->Message +
"\n" + this->StackTrace;
94 #endif //vtk_m_cont_Error_h
#define VTKM_SILENCE_WEAK_VTABLE_WARNING_START
Definition: ExportMacros.h:119
Groups connected points that have the same field value.
Definition: Atomic.h:19
std::string StackTrace
Definition: Error.h:85
std::string GetStackTrace(vtkm::Int32 skip=0)
Returns a stacktrace on supported platforms.
#define VTKM_SILENCE_WEAK_VTABLE_WARNING_END
Definition: ExportMacros.h:120
The superclass of all exceptions thrown by any VTKm function or method.
Definition: Error.h:33
std::string What
Definition: Error.h:86
std::string Message
Definition: Error.h:84
bool GetIsDeviceIndependent() const
Returns true if this exception is device independent.
Definition: Error.h:60
bool IsDeviceIndependent
Definition: Error.h:87
void SetMessage(const std::string &message)
Definition: Error.h:77
const char * what() const noexcept override
Returns the message for the error and the stack trace for it.
Definition: Error.h:55
Error()
Definition: Error.h:63
#define VTKM_ALWAYS_EXPORT
Definition: ExportMacros.h:89
Error(const std::string &message, bool is_device_independent=false)
Definition: Error.h:69