resonance
1.0.1
Loading...
Searching...
No Matches
imageerror.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <expected>
4
#include <string>
5
#include <utility>
6
7
#include "
error.h
"
8
9
namespace
Tools::BuildImage
{
10
17
inline
std::unexpected<Error>
discImageError
(std::string message) {
18
return
std::unexpected(
Error
{
ErrorCode::InvalidInput
, std::move(message)});
19
}
20
27
inline
std::unexpected<Error>
artifactError
(std::string message) {
28
return
std::unexpected(
Error
{
ErrorCode::Network
, std::move(message)});
29
}
30
37
inline
std::unexpected<Error>
ioError
(std::string message) {
38
return
std::unexpected(
Error
{
ErrorCode::Io
, std::move(message)});
39
}
40
41
}
// namespace Tools::BuildImage
error.h
Tools::BuildImage
Writer of a FreQuency disc image with the built executable and module in place.
Definition
byteorder.h:7
Tools::BuildImage::artifactError
std::unexpected< Error > artifactError(std::string message)
Report that build artifacts cannot be fetched from GitHub.
Definition
imageerror.h:27
Tools::BuildImage::ioError
std::unexpected< Error > ioError(std::string message)
Report that a file cannot be read or written.
Definition
imageerror.h:37
Tools::BuildImage::discImageError
std::unexpected< Error > discImageError(std::string message)
Report that the disc image cannot be read or rewritten.
Definition
imageerror.h:17
Tools::ErrorCode::Io
@ Io
Definition
error.h:11
Tools::ErrorCode::InvalidInput
@ InvalidInput
Definition
error.h:10
Tools::ErrorCode::Network
@ Network
Definition
error.h:12
Tools::Error
Failure returned through std::expected.
Definition
error.h:17
tools
build-image
imageerror.h
Generated by
1.15.0