MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / Error

Class Error

src/include/expected.hpp:337–355  ·  view source on GitHub ↗

错误类型,用于 std::expected

Source from the content-addressed store, hash-verified

335
336/// 错误类型,用于 std::expected
337struct Error {
338 ErrorCode code{ErrorCode::kSuccess};
339
340 explicit constexpr Error(ErrorCode c) : code(c) {}
341
342 /// @name 构造/析构函数
343 /// @{
344 Error() = default;
345 Error(const Error&) = default;
346 Error(Error&&) = default;
347 auto operator=(const Error&) -> Error& = default;
348 auto operator=(Error&&) -> Error& = default;
349 ~Error() = default;
350 /// @}
351
352 [[nodiscard]] constexpr auto message() const -> const char* {
353 return GetErrorMessage(code);
354 }
355};
356
357/// std::expected 别名模板
358template <typename T>

Callers 15

SendIpiMethod · 0.85
CloneMethod · 0.85
MapPageMethod · 0.85
UnmapPageMethod · 0.85
GetMappingMethod · 0.85
ClonePageDirectoryMethod · 0.85
FindPageTableEntryMethod · 0.85
FindDeviceMethod · 0.85
ProbeMethod · 0.85

Calls

no outgoing calls

Tested by 5

ReadMethod · 0.68
WriteMethod · 0.68
SeekMethod · 0.68
ReadDirMethod · 0.68
AllocateInodeMethod · 0.68