Viskores  1.0
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
viskores::cont::Error Class Reference

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

#include <Error.h>

Inheritance diagram for viskores::cont::Error:
viskores::cont::cuda::ErrorCuda viskores::cont::ErrorBadAllocation viskores::cont::ErrorBadDevice viskores::cont::ErrorBadType viskores::cont::ErrorBadValue viskores::cont::ErrorExecution viskores::cont::ErrorFilterExecution viskores::cont::ErrorInternal viskores::cont::ErrorUserAbort viskores::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 Viskores function or method.

Constructor & Destructor Documentation

◆ Error() [1/2]

viskores::cont::Error::Error ( )
inlineprotected

◆ Error() [2/2]

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

Member Function Documentation

◆ GetIsDeviceIndependent()

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

Returns true if this exception is device independent.

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

◆ GetMessage()

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

Returns a message describing what caused the error.

◆ GetStackTrace()

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

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

◆ SetMessage()

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

◆ what()

const char* viskores::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 viskores::cont::Error::IsDeviceIndependent
private

◆ Message

std::string viskores::cont::Error::Message
private

◆ StackTrace

std::string viskores::cont::Error::StackTrace
private

◆ What

std::string viskores::cont::Error::What
private

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