HAL
hal::Error Class Referencefinal

#include <error.h>

Collaboration diagram for hal::Error:
Collaboration graph

Public Member Functions

 Error ()=default
 
 Error (Error &&)=default
 
Erroroperator= (const Error &)=default
 
Erroroperator= (Error &&)=default
 
 Error (const std::string &file, u32 line, const std::string &message)
 
 Error (const Error &error)
 
 Error (const std::string &file, u32 line, const Error &error)
 
 Error (const std::string &file, u32 line, const Error &error, const std::string &message)
 
const std::string & get () const
 

Detailed Description

Definition at line 32 of file error.h.

Constructor & Destructor Documentation

◆ Error() [1/6]

hal::Error::Error ( )
default

◆ Error() [2/6]

hal::Error::Error ( Error &&  )
default

◆ Error() [3/6]

hal::Error::Error ( const std::string &  file,
u32  line,
const std::string &  message 
)
inlineexplicit

Construct an error from a file path, a line number and an error message.

Parameters
[in]file- Path to the file in which the error occured.
[in]line- Line number at which the error occured.
[in]message- The error message.

Definition at line 48 of file error.h.

◆ Error() [4/6]

hal::Error::Error ( const Error error)
inline

Construct an error from an existing error by copying the original error message.

Parameters
[in]error- The existing error.

Definition at line 55 of file error.h.

References hal::error.

◆ Error() [5/6]

hal::Error::Error ( const std::string &  file,
u32  line,
const Error error 
)
inline

Construct an error from an existing error by copying the original error message and appending the current file and line number.

Parameters
[in]file- Path to the file in which the error occured.
[in]line- Line number at which the error occured.
[in]error- The existing error.

Definition at line 66 of file error.h.

References hal::error.

◆ Error() [6/6]

hal::Error::Error ( const std::string &  file,
u32  line,
const Error error,
const std::string &  message 
)
inline

Construct an error from an existing error by copying the original error message and appending a new message as well as the current file and line number.

Parameters
[in]file- Path to the file in which the error occured.
[in]line- Line number at which the error occured.
[in]error- The existing error.
[in]message- The error message to append.

Definition at line 76 of file error.h.

References hal::error.

Member Function Documentation

◆ get()

const std::string& hal::Error::get ( ) const
inline

Get the error message.

Returns
The error message.

Definition at line 83 of file error.h.

◆ operator=() [1/2]

Error& hal::Error::operator= ( const Error )
default

◆ operator=() [2/2]

Error& hal::Error::operator= ( Error &&  )
default

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