EchoMap
2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Toggle main menu visibility
Loading...
Searching...
No Matches
ErrorResult.hpp
Go to the documentation of this file.
1
9
10
#ifndef ECHOMAP_ERRORRESULT_HPP
11
#define ECHOMAP_ERRORRESULT_HPP
12
13
#include <
memory
>
14
#include <source_location>
15
#include <
string
>
16
#include <
string_view
>
17
18
namespace
echomap
19
{
20
21
class
ITask
;
22
class
LocatableError
;
23
27
class
ErrorResult
28
{
29
public
:
37
explicit
ErrorResult
(
38
std::string_view
message,
39
std::source_location
location,
40
std::unique_ptr<ITask>
responsible_task
41
);
42
49
explicit
ErrorResult
(
50
const
LocatableError
& exception,
51
std::unique_ptr<ITask>
responsible_task
52
);
53
54
~ErrorResult
()
noexcept
;
55
56
ErrorResult
(
const
ErrorResult
&) =
delete
;
57
ErrorResult
& operator=(
const
ErrorResult
&) =
delete
;
58
59
ErrorResult
(
ErrorResult
&&)
noexcept
;
60
66
[[nodiscard]]
std::string_view
what
()
const
noexcept
;
67
73
[[nodiscard]]
const
std::source_location
&
where
()
const
noexcept
;
74
81
[[nodiscard]]
const
ITask
*
observe_responsible_task
()
const
noexcept
;
82
83
private
:
84
std::string
message;
85
std::source_location
location;
86
std::unique_ptr<ITask>
responsible_task;
87
};
88
89
}
// namespace echomap
90
91
#endif
// ECHOMAP_ERRORRESULT_HPP
std::string
std::string_view
echomap::ErrorResult::where
const std::source_location & where() const noexcept
Observes the location of the error origin.
Definition
ErrorResult.cpp:49
echomap::ErrorResult::observe_responsible_task
const ITask * observe_responsible_task() const noexcept
Retrieves an observing pointer to the ITask responsible for causing the ErrorResult.
Definition
ErrorResult.cpp:54
echomap::ErrorResult::what
std::string_view what() const noexcept
Observes the human-readable error message.
Definition
ErrorResult.cpp:44
echomap::ErrorResult::ErrorResult
ErrorResult(std::string_view message, std::source_location location, std::unique_ptr< ITask > responsible_task)
Create a new ErrorResult literally specifying the message, location, and the responsible task.
Definition
ErrorResult.cpp:19
echomap::ITask
An ITask represents an invocable piece of work that produces a WorkerResult.
Definition
ITask.hpp:23
echomap::LocatableError
Definition
LocatableError.hpp:16
memory
echomap
The main EchoMap outermost namespace for all non-exported symbols.
Definition
ActionController.hpp:20
std::source_location
string
string_view
std::unique_ptr
src
async
results
ErrorResult.hpp
Generated by
1.17.0