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.cpp
Go to the documentation of this file.
1
9
10
#include "
ErrorResult.hpp
"
11
12
#include "../../errors/LocatableError.hpp"
13
#include "
../../objects/Signal.hpp
"
14
#include "
../tasks/ITask.hpp
"
15
16
namespace
echomap
17
{
18
19
ErrorResult::ErrorResult
(
20
const
std::string_view
message,
21
const
std::source_location
location,
22
std::unique_ptr<ITask>
responsible_task
23
) :
24
message(message),
25
location(location),
26
responsible_task(
std
::move(responsible_task))
27
{
28
}
29
30
ErrorResult::ErrorResult
(
31
const
LocatableError
& exception,
32
std::unique_ptr<ITask>
responsible_task
33
) :
34
message(exception.
what
()),
35
location(exception.
where
()),
36
responsible_task(
std
::move(responsible_task))
37
{
38
}
39
40
ErrorResult::~ErrorResult() noexcept = default;
41
42
ErrorResult
::
ErrorResult
(
ErrorResult
&&) noexcept = default;
43
44
std
::string_view
ErrorResult
::
what
() const noexcept
45
{
46
return
message;
47
}
48
49
const
std::source_location
&
ErrorResult::where
() const noexcept
50
{
51
return
location;
52
}
53
54
const
ITask
*
ErrorResult::observe_responsible_task
() const noexcept
55
{
56
return
responsible_task.get();
57
}
58
59
}
// namespace echomap
ErrorResult.hpp
ErrorResult specification.
ITask.hpp
Task description interface specification.
Signal.hpp
Audio signal class specification.
std::string_view
echomap::ErrorResult
Indicates that an ITask did not successfully complete.
Definition
ErrorResult.hpp:28
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
echomap
The main EchoMap outermost namespace for all non-exported symbols.
Definition
ActionController.hpp:20
std
STL namespace.
std::source_location
std::unique_ptr
src
async
results
ErrorResult.cpp
Generated by
1.17.0