DoxigAlpha

err

Function parameters

Parameters

#

Type definitions in this namespace

Types

#

Source

Implementation

#
pub fn err(self: Status) Error!void {
    switch (self) {
        .load_error => return error.LoadError,
        .invalid_parameter => return error.InvalidParameter,
        .unsupported => return error.Unsupported,
        .bad_buffer_size => return error.BadBufferSize,
        .buffer_too_small => return error.BufferTooSmall,
        .not_ready => return error.NotReady,
        .device_error => return error.DeviceError,
        .write_protected => return error.WriteProtected,
        .out_of_resources => return error.OutOfResources,
        .volume_corrupted => return error.VolumeCorrupted,
        .volume_full => return error.VolumeFull,
        .no_media => return error.NoMedia,
        .media_changed => return error.MediaChanged,
        .not_found => return error.NotFound,
        .access_denied => return error.AccessDenied,
        .no_response => return error.NoResponse,
        .no_mapping => return error.NoMapping,
        .timeout => return error.Timeout,
        .not_started => return error.NotStarted,
        .already_started => return error.AlreadyStarted,
        .aborted => return error.Aborted,
        .icmp_error => return error.IcmpError,
        .tftp_error => return error.TftpError,
        .protocol_error => return error.ProtocolError,
        .incompatible_version => return error.IncompatibleVersion,
        .security_violation => return error.SecurityViolation,
        .crc_error => return error.CrcError,
        .end_of_media => return error.EndOfMedia,
        .end_of_file => return error.EndOfFile,
        .invalid_language => return error.InvalidLanguage,
        .compromised_data => return error.CompromisedData,
        .ip_address_conflict => return error.IpAddressConflict,
        .http_error => return error.HttpError,
        .network_unreachable => return error.NetworkUnreachable,
        .host_unreachable => return error.HostUnreachable,
        .protocol_unreachable => return error.ProtocolUnreachable,
        .port_unreachable => return error.PortUnreachable,
        .connection_fin => return error.ConnectionFin,
        .connection_reset => return error.ConnectionReset,
        .connection_refused => return error.ConnectionRefused,
        // success, warn_*, _
        else => {},
    }
}