ZXFoundation™ 26h2
Loading...
Searching...
No Matches
lib.error Module Reference

Data Structures

struct  lib::format::formatter< lib::kernel_error >
 Formatter specialization for lib::kernel_error. More...
struct  lib::kernel_error
 Unified kernel error type. More...

Enumerations

enum  lib::arch_error::code : u32 {
  none = 0 , lib::arch_error::sigp_busy = 1 , lib::arch_error::sigp_not_operational = 2 , lib::arch_error::sigp_invalid_order = 3 ,
  lib::arch_error::psw_invalid_mask = 4 , lib::arch_error::psw_invalid_address = 5 , lib::arch_error::stfle_failed = 6 , lib::arch_error::stsi_failed = 7 ,
  lib::arch_error::cpu_not_available = 8 , lib::arch_error::invalid_cpu_id = 9 , lib::arch_error::sthyi_failed = 10 , lib::arch_error::sclp_failed = 11 ,
  lib::arch_error::ecag_failed = 12 , lib::arch_error::cpu_mf_failed = 13 , lib::arch_error::uv_failed = 14 , lib::arch_error::stp_failed = 15 ,
  lib::arch_error::ptff_failed = 16 , lib::arch_error::diag_failed = 17 , lib::arch_error::sigp_failed = 18
}
enum  lib::crypto_error::code : u32 { none = 0 , lib::crypto_error::invalid_input = 1 , lib::crypto_error::hash_mismatch = 2 , lib::crypto_error::verification_failed = 3 }
enum  lib::driver_error::code : u32 {
  none = 0 , lib::driver_error::not_found = 1 , lib::driver_error::not_ready = 2 , lib::driver_error::io_error = 3 ,
  lib::driver_error::timeout = 4 , lib::driver_error::busy = 5
}
enum  lib::generic_error::code : u32 {
  none = 0 , lib::generic_error::invalid_arg = 1 , lib::generic_error::not_supported = 2 , lib::generic_error::not_implemented = 3 ,
  lib::generic_error::internal_error = 4 , lib::generic_error::not_found = 5 , lib::generic_error::unknown = 6 , lib::generic_error::out_of_range = 7 ,
  lib::generic_error::uninitialized = 8 , lib::generic_error::stall = 9
}
enum  lib::init_error::code : u32 { none = 0 , lib::init_error::boot_failed = 1 , lib::init_error::invalid_protocol = 2 , lib::init_error::checksum_mismatch = 3 }
enum  lib::locking_error::code : u32 {
  none = 0 , lib::locking_error::timeout = 1 , lib::locking_error::deadlock_detected = 2 , lib::locking_error::already_locked = 3 ,
  lib::locking_error::not_locked = 4 , lib::locking_error::max_depth_exceeded = 5
}
enum  code : u32 {
  none = 0 , system_damage = 1 , inst_process_damage = 2 , system_recovery = 3 ,
  timing_facility = 4 , external_damage = 5 , failing_storage_addr = 6 , storage_error_uncorrected = 7 ,
  storage_key_error = 8 , storage_degradation = 9 , degradation = 10 , warning = 11 ,
  channel_report_pending = 12 , service_processor_damage = 13 , channel_subsystem_damage = 14 , backlog = 15
}
enum  lib::memory_error::code : u32 {
  none = 0 , lib::memory_error::out_of_memory = 1 , lib::memory_error::invalid_address = 2 , lib::memory_error::alignment_error = 3 ,
  lib::memory_error::region_overlap = 4 , lib::memory_error::hhdm_init_failed = 5 , lib::memory_error::page_fault = 6 , lib::memory_error::invalid_irq_contex = 7 ,
  lib::memory_error::transaction_aborted = 8 , lib::memory_error::capability_invalid = 9 , lib::memory_error::purpose_mismatch = 10 , lib::memory_error::zone_exhausted = 11 ,
  lib::memory_error::ssp_check_fail = 13
}
enum  lib::time_error::code : u32 { none = 0 , lib::time_error::clock_not_available = 1 , lib::time_error::invalid_timestamp = 2 , lib::time_error::adjustment_failed = 3 }
enum class  lib::error_category : u8 {
  none = 0 , arch , memory , locking ,
  crypto , driver , init , time ,
  generic , machine
}
 Error category discriminator for kernel subsystems. More...

Functions

constexpr auto lib::category_name (error_category cat) noexcept -> std::string_view
 Return the ASCII name of an error_category.
constexpr auto lib::error_code_name (error_category cat, u32 code) noexcept -> std::string_view
 Return the ASCII name of a per-category error code.
static auto format (format_context &ctx, const kernel_error &val) noexcept -> void
 Format a kernel_error into the context.
static constexpr auto from_arch (arch_error::code c) noexcept -> kernel_error
 Construct architecture error.
static constexpr auto from_crypto (crypto_error::code c) noexcept -> kernel_error
 Construct cryptographic error.
static constexpr auto from_driver (driver_error::code c) noexcept -> kernel_error
 Construct driver error.
static constexpr auto from_generic (generic_error::code c) noexcept -> kernel_error
 Construct generic error.
static constexpr auto from_init (init_error::code c) noexcept -> kernel_error
 Construct initialization error.
static constexpr auto from_locking (locking_error::code c) noexcept -> kernel_error
 Construct locking error.
static constexpr auto from_machine (machine_error::code c) noexcept -> kernel_error
static constexpr auto from_memory (memory_error::code c) noexcept -> kernel_error
 Construct memory error.
static constexpr auto from_time (time_error::code c) noexcept -> kernel_error
 Construct time error.
constexpr kernel_error () noexcept
 Default constructor: no error.
constexpr kernel_error (error_category cat, u32 c) noexcept
 Construct from category and raw code.
constexpr operator bool () const noexcept
 Check if error is non-zero.
constexpr auto operator!= (const kernel_error &other) const noexcept -> bool
 Check if two errors differ.
constexpr auto operator== (const kernel_error &other) const noexcept -> bool
 Check if two errors are identical.

Variables

error_category category
 Error category discriminator.
u32 code
 Subsystem-specific error code.

Files

file  lib/error.cxxm
 Kernel error code system for all subsystems.