VTK-m  2.2
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
vtkm::cont::Error Class Reference

The superclass of all exceptions thrown by any VTKm function or method. More...

#include <Error.h>

Inheritance diagram for vtkm::cont::Error:
vtkm::cont::cuda::ErrorCuda vtkm::cont::ErrorBadAllocation vtkm::cont::ErrorBadDevice vtkm::cont::ErrorBadType vtkm::cont::ErrorBadValue vtkm::cont::ErrorExecution vtkm::cont::ErrorFilterExecution vtkm::cont::ErrorInternal vtkm::cont::ErrorUserAbort vtkm::io::ErrorIO

Public Member Functions

const std::string & GetMessage () const
 Returns a message describing what caused the error. More...
 
const std::string & GetStackTrace () const
 Provides a stack trace to the location where this error was thrown. More...
 
const char * what () const noexcept override
 Returns the message for the error and the stack trace for it. More...
 
bool GetIsDeviceIndependent () const
 Returns true if this exception is device independent. More...
 

Protected Member Functions

 Error ()
 
 Error (const std::string &message, bool is_device_independent=false)
 
void SetMessage (const std::string &message)
 

Private Attributes

std::string Message
 
std::string StackTrace
 
std::string What
 
bool IsDeviceIndependent
 

Detailed Description

The superclass of all exceptions thrown by any VTKm function or method.

Constructor & Destructor Documentation

◆ Error() [1/2]

vtkm::cont::Error::Error ( )
inlineprotected

◆ Error() [2/2]

vtkm::cont::Error::Error ( const std::string &  message,
bool  is_device_independent = false 
)
inlineprotected

Member Function Documentation

◆ GetIsDeviceIndependent()

bool vtkm::cont::Error::GetIsDeviceIndependent ( ) const
inline

Returns true if this exception is device independent.

For exceptions that are not device independent, vtkm::TryExecute, for example, may try executing the code on other available devices.

◆ GetMessage()

const std::string& vtkm::cont::Error::GetMessage ( ) const
inline

Returns a message describing what caused the error.

◆ GetStackTrace()

const std::string& vtkm::cont::Error::GetStackTrace ( ) const
inline

Provides a stack trace to the location where this error was thrown.

◆ SetMessage()

void vtkm::cont::Error::SetMessage ( const std::string &  message)
inlineprotected

◆ what()

const char* vtkm::cont::Error::what ( ) const
inlineoverridenoexcept

Returns the message for the error and the stack trace for it.

This method is provided for std::exception compatibility.

Member Data Documentation

◆ IsDeviceIndependent

bool vtkm::cont::Error::IsDeviceIndependent
private

◆ Message

std::string vtkm::cont::Error::Message
private

◆ StackTrace

std::string vtkm::cont::Error::StackTrace
private

◆ What

std::string vtkm::cont::Error::What
private

The documentation for this class was generated from the following file: