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
9namespace Tools::BuildImage {
10
17inline std::unexpected<Error> discImageError(std::string message) {
18 return std::unexpected(Error{ErrorCode::InvalidInput, std::move(message)});
19}
20
27inline std::unexpected<Error> artifactError(std::string message) {
28 return std::unexpected(Error{ErrorCode::Network, std::move(message)});
29}
30
37inline std::unexpected<Error> ioError(std::string message) {
38 return std::unexpected(Error{ErrorCode::Io, std::move(message)});
39}
40
41} // namespace Tools::BuildImage
Writer of a FreQuency disc image with the built executable and module in place.
Definition byteorder.h:7
std::unexpected< Error > artifactError(std::string message)
Report that build artifacts cannot be fetched from GitHub.
Definition imageerror.h:27
std::unexpected< Error > ioError(std::string message)
Report that a file cannot be read or written.
Definition imageerror.h:37
std::unexpected< Error > discImageError(std::string message)
Report that the disc image cannot be read or rewritten.
Definition imageerror.h:17
@ Io
Definition error.h:11
@ InvalidInput
Definition error.h:10
@ Network
Definition error.h:12
Failure returned through std::expected.
Definition error.h:17