hueplusplus  1.0.0
Public Member Functions | Protected Member Functions | List of all members
hueplusplus::HueException Class Reference

Exception class with file information. Base class of all custom exception classes. More...

#include <hueplusplus/HueException.h>

+ Inheritance diagram for hueplusplus::HueException:
+ Collaboration diagram for hueplusplus::HueException:

Public Member Functions

 HueException (FileInfo fileInfo, const std::string &message)
 Creates HueException with information about the error and source. More...
 
const char * what () const noexcept override
 What message of the exception. More...
 
const FileInfoGetFile () const noexcept
 Filename and line where the exception was thrown or caused by. More...
 

Protected Member Functions

 HueException (const char *exceptionName, FileInfo fileInfo, const std::string &message)
 Creates HueException with child class name. More...
 

Detailed Description

Exception class with file information. Base class of all custom exception classes.

Constructor & Destructor Documentation

◆ HueException() [1/2]

hueplusplus::HueException::HueException ( FileInfo  fileInfo,
const std::string &  message 
)

Creates HueException with information about the error and source.

Parameters
fileInfoSource of the error. Must not always be the throw location, can also be a calling function which matches the cause better.
messageHuman readable error message.

◆ HueException() [2/2]

hueplusplus::HueException::HueException ( const char *  exceptionName,
FileInfo  fileInfo,
const std::string &  message 
)
protected

Creates HueException with child class name.

Should be used by subclasses which can append additional information to the end of whatMessage.

Parameters
exceptionNameclass name of the subclass
fileInfoSource of the error. Must not always be the throw location, can also be a calling function which matches the cause better.
messageHuman readable error message

Member Function Documentation

◆ GetFile()

const FileInfo & hueplusplus::HueException::GetFile ( ) const
noexcept

Filename and line where the exception was thrown or caused by.

◆ what()

const char * hueplusplus::HueException::what ( ) const
overridenoexcept

What message of the exception.

Returns
exception name, file info and constructor message as char* into member string

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