ZXFoundation™ 26h2
Loading...
Searching...
No Matches
error.cxxm File Reference
module lib.error

Kernel error code system for all subsystems. More...

import std;
import lib.format;
import zxfoundation.base.types;
Include dependency graph for error.cxxm:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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...

Namespaces

namespace  lib::arch_error
 s390x architecture-specific error codes.
namespace  lib::crypto_error
 Cryptographic operation error codes.
namespace  lib::driver_error
 Device driver error codes.
namespace  lib::generic_error
 Generic kernel error codes.
namespace  lib::init_error
 Initialization and boot error codes.
namespace  lib::locking_error
 Locking and synchronization error codes.
namespace  lib::machine_error
 machine error (for mcck)
namespace  lib::memory_error
 Memory management error codes.
namespace  lib::time_error
 Time and clock error codes.

Macros

#define expand(error)
#define expand(error)
#define expand(error)
#define expand(error)
#define expand(error)
#define expand(error)
#define expand(error)
#define expand(error)
#define expand(error)
#define expand(error)

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.

Detailed Description

Kernel error code system for all subsystems.

SPDX-License-Identifier: Apache 2.0

Macro Definition Documentation

◆ expand [1/10]

#define expand ( error)
Value:
case machine_error::error: return stringify(error);

◆ expand [2/10]

#define expand ( error)
Value:
case generic_error::error: return stringify(error);

◆ expand [3/10]

#define expand ( error)
Value:
case time_error::error: return stringify(error);

◆ expand [4/10]

#define expand ( error)
Value:
case init_error::error: return stringify(error);

◆ expand [5/10]

#define expand ( error)
Value:
case driver_error::error: return stringify(error);

◆ expand [6/10]

#define expand ( error)
Value:
case crypto_error::error: return stringify(error);

◆ expand [7/10]

#define expand ( error)
Value:
case locking_error::error: return stringify(error);

◆ expand [8/10]

#define expand ( error)
Value:
case memory_error::error: return stringify(error);

◆ expand [9/10]

#define expand ( error)
Value:
case arch_error::error: return stringify(error);

◆ expand [10/10]

#define expand ( error)
Value:
case error_category::error: return stringify(error);

Enumeration Type Documentation

◆ error_category

enum class lib::error_category : u8
exportstrong

Error category discriminator for kernel subsystems.

Enumerator
none 

No error.

arch 

s390x architecture errors (SIGP, PSW, facilities).

memory 

Memory management errors.

locking 

Lock and synchronization errors.

crypto 

Cryptographic operation errors.

driver 

Device driver errors.

init 

Initialization and boot errors.

time 

Time and clock errors.

generic 

Generic kernel errors.

machine 

Machine errors.

Function Documentation

◆ category_name()

auto lib::category_name ( error_category cat) ->std::string_view
nodiscardconstexprexportnoexcept

Return the ASCII name of an error_category.

Parameters
[in]catCategory to name.
Returns
Statically allocated string; never null.

◆ error_code_name()

auto lib::error_code_name ( error_category cat,
u32 code )->std::string_view
nodiscardconstexprexportnoexcept

Return the ASCII name of a per-category error code.

Parameters
[in]catCategory that owns the code.
[in]codeRaw code value.
Returns
Statically allocated string; "?" if code is unknown.