Developer Documentation

OdinResult

public enum OdinResult: Error, CustomStringConvertible

Collection of functions to handle ODIN return codes.

Cases

success

case success

A function completed successfully.

error(_:)

case error(String)

A function aborted with an error.

value(_:)

case value(UInt32)

A function returned an integer value.

Properties

description

public var description: String

A string representation of the result.

Methods

format(_:)

public static func format(_ code: UInt32) -> OdinResult

Helper function that formats a specified return code using a set of pre-defined cases.

validate(_:)

public static func validate(_ code: UInt32) throws

Helper function that validates a specified return code and throws an error if necessary.