Wasabi
Public Member Functions | Public Attributes | List of all members
WError Class Reference

#include <WError.hpp>

Public Member Functions

 WError (W_ERROR err)
 
std::string AsString (bool getBacktrace=false) const
 
 operator bool ()
 
bool operator== (const WError &other) const
 
bool operator== (const W_ERROR &other) const
 
bool operator!= (const WError &other) const
 
bool operator!= (const W_ERROR &other) const
 

Public Attributes

W_ERROR m_error
 

Detailed Description

This class represents a general purpose error code.

Member Function Documentation

◆ AsString()

std::string WError::AsString ( bool  getBacktrace = false) const

Retrieves the string corresponding to the carried error.

Parameters
getBacktraceWhether or not to include a backtrace in the returned string
Returns
A string corresponding to m_error

◆ operator bool()

WError::operator bool ( )

Evaluates this error code to a boolean.

Returns
return true if m_error == W_SUCCEEDED, false otherwise

◆ operator!=() [1/2]

bool WError::operator!= ( const W_ERROR other) const

Performs != on the underlying m_error

◆ operator!=() [2/2]

bool WError::operator!= ( const WError other) const

Performs != on the underlying m_error

◆ operator==() [1/2]

bool WError::operator== ( const W_ERROR other) const

Performs == on the underlying m_error

◆ operator==() [2/2]

bool WError::operator== ( const WError other) const

Performs == on the underlying m_error

Member Data Documentation

◆ m_error

W_ERROR WError::m_error

The carried error code


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