18 lines
669 B
Swift
18 lines
669 B
Swift
// PresetError.swift
|
|
// Lyrebird
|
|
//
|
|
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
/// Errors thrown by preset load and version-check operations.
|
|
///
|
|
/// - `unsupportedVersion`: The serialised preset's `version` field exceeds
|
|
/// `presetFormatVersion`. The associated value carries the version number that
|
|
/// was found in the file so callers can surface a meaningful error message.
|
|
public enum PresetError: Error, Equatable {
|
|
|
|
/// The preset file was written by a newer version of the format than this
|
|
/// build understands. The associated `Int` is the version found in the file.
|
|
case unsupportedVersion(Int)
|
|
}
|