21 lines
386 B
Swift
21 lines
386 B
Swift
//
|
||
// SDLSuperError.swift
|
||
// punchnet
|
||
//
|
||
// Created by 安礼成 on 2026/5/22.
|
||
//
|
||
import Foundation
|
||
|
||
// 定义错误类型,便于上层处理
|
||
enum SDLSuperError: Error {
|
||
case connectionFailed(Error)
|
||
case connectionCancelled
|
||
case writeFailed(Error)
|
||
|
||
case internalError(Error)
|
||
case packetTooLarge
|
||
|
||
case decodeError(String)
|
||
case dataStreamClosed
|
||
}
|