EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Loading...
Searching...
No Matches
echomap::LocatableError Class Reference
Inheritance diagram for echomap::LocatableError:
[legend]

Public Member Functions

 LocatableError (std::string_view message, std::source_location location=std::source_location::current())
 Create a new LocatableError with the given message at the given location.
const std::source_locationwhere () const noexcept
 Retrieves the location of the throwing statement.
Public Member Functions inherited from std::runtime_error
runtime_error (T... args)
what (T... args)
Public Member Functions inherited from std::exception
exception (T... args)
operator= (T... args)
what (T... args)
~exception (T... args)

Private Attributes

std::source_location location

Detailed Description

Definition at line 15 of file LocatableError.hpp.

Constructor & Destructor Documentation

◆ LocatableError()

echomap::LocatableError::LocatableError ( std::string_view message,
std::source_location location = std::source_location::current() )
explicit

Create a new LocatableError with the given message at the given location.

Parameters
messageHuman-readable message indicating the cause of the error.
locationOptional location of the throwing statement.

Definition at line 12 of file LocatableError.cpp.

15 :
16 std::runtime_error(std::string(message)),
17 location(location)
18{
19}

Member Function Documentation

◆ where()

const std::source_location & echomap::LocatableError::where ( ) const
nodiscardnoexcept

Retrieves the location of the throwing statement.

Returns
The location of the throwing statement, if provided. Otherwise, provides the location of the LocatableError constructor.

Definition at line 21 of file LocatableError.cpp.

22{
23 return location;
24}

Member Data Documentation

◆ location

std::source_location echomap::LocatableError::location
private

Definition at line 38 of file LocatableError.hpp.


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