5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_FILESYSTEM_ERROR_CODE_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_FILESYSTEM_ERROR_CODE_HPP_
11#include "arene/base/compare.hpp"
12#include "arene/base/compiler_support/attributes.hpp"
13#include "arene/base/inline_string.hpp"
14#include "arene/base/string_view.hpp"
26constexpr std::size_t max_error_length{128U};
37 using raw_error_code =
int;
49 constexpr explicit error_code(raw_error_code
const error)
noexcept
56 static auto from_errno()
noexcept -> error_code;
60 constexpr auto value()
const noexcept -> raw_error_code {
return error_; }
65 explicit operator
bool()
const noexcept {
return value() != 0; }
70 void clear()
noexcept { error_ = 0; }
74 auto message()
const noexcept -> error_string;
79 ARENE_NORETURN
void throw_error()
const;
88 ARENE_NORETURN
void throw_error_with_prefix(null_terminated_string_view
const message_prefix)
const;
93 raw_error_code error_;
Definition directory_handle.cpp:39
Definition array_exceptions_disabled.cpp:11
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10