HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
Loading...
Searching...
No Matches
Heph::ExternalException Class Reference

raised when an operation from an external library/API fails. More...

#include <ExternalException.h>

Inheritance diagram for Heph::ExternalException:
Heph::Exception

Public Member Functions

 ExternalException ()
 
 ExternalException (const std::string &method, const std::string &message, const std::string &externalSource, const std::string &externalMessage)
 
virtual std::string GetName () const override
 
virtual const std::string & GetExternalSource () const
 
virtual const std::string & GetExternalMessage () const
 
- Public Member Functions inherited from Heph::Exception
 Exception ()
 
 Exception (const std::string &method, const std::string &message)
 
virtual ~Exception ()=default
 
virtual const char * what () const noexcept override
 
virtual const std::string & GetMethod () const
 
virtual const std::string & GetMessage () const
 
virtual void Raise (const void *pSender) const
 

Protected Member Functions

virtual void AddToExceptions () const override
 

Protected Attributes

std::string externalSource
 
std::string externalMessage
 
- Protected Attributes inherited from Heph::Exception
std::string method
 
std::string message
 

Additional Inherited Members

- Static Public Member Functions inherited from Heph::Exception
static std::shared_ptr< ExceptionGetLastException () noexcept
 
static std::vector< std::shared_ptr< Exception > > & GetExceptions () noexcept
 
static void DefaultHandler (const EventParams &params)
 
- Static Public Attributes inherited from Heph::Exception
static Event OnException = Event()
 

Detailed Description

raised when an operation from an external library/API fails.

Constructor & Destructor Documentation

◆ ExternalException() [1/2]

Heph::ExternalException::ExternalException ( )

creates a new instance and initializes it with default values.

◆ ExternalException() [2/2]

Heph::ExternalException::ExternalException ( const std::string & method,
const std::string & message,
const std::string & externalSource,
const std::string & externalMessage )

creates a new instance and initializes it with the provided values.

Parameters
methodname of the method where the exception occurred.
messagedescription of the exception.
externalSourcename of the external source that caused the exception.
externalMessagedescription of the exception provided by the external source.

Member Function Documentation

◆ GetName()

virtual std::string Heph::ExternalException::GetName ( ) const
overridevirtual

gets the human readable name of the exception.

Reimplemented from Heph::Exception.

◆ GetExternalSource()

virtual const std::string & Heph::ExternalException::GetExternalSource ( ) const
virtual

gets the external source.

◆ GetExternalMessage()

virtual const std::string & Heph::ExternalException::GetExternalMessage ( ) const
virtual

gets the external message.

◆ AddToExceptions()

virtual void Heph::ExternalException::AddToExceptions ( ) const
overrideprotectedvirtual

adds the exception to the thread local exceptions vector.

Reimplemented from Heph::Exception.

Member Data Documentation

◆ externalSource

std::string Heph::ExternalException::externalSource
protected

name of the external source that caused the exception.

◆ externalMessage

std::string Heph::ExternalException::externalMessage
protected

description of the exception provided by the external source.