BinaryStreamDecoding
Errors arising from decoding streams of binary messages. These errors have to do with the framing of the messages in the stream, or the stream as a whole.
enum BinaryStreamDecoding
Errors arising from decoding streams of binary messages. These errors have to do with the framing of the messages in the stream, or the stream as a whole.
enum BinaryStreamDecoding
import SwiftProtobuf
Support library for Swift code generated by protoc-gen-swift.
struct SwiftProtobufError
A SwiftProtobuf specific error.
init(code: Code, message: String, location: SourceLocation)
var code: Code { get set }
A high-level error code to provide broad a classification.
var debugDescription: String { get }
var description: String { get }
enum BinaryDecoding
Errors arising from binary decoding of data into protobufs.
struct Code
A high level indication of the kind of error being thrown.
enum JSONDecoding
Errors arising from JSON decoding of data into protobufs.
enum JSONEncoding
Errors arising from JSON encoding of messages.
struct SourceLocation
A location within source code.
static func malformedLength(function: String = #function, file: String = #fileID, line: Int = #line) -> SwiftProtobufError
While attempting to read the length of a message on the stream, the bytes were malformed for the protobuf format.
static func noBytesAvailable(function: String = #function, file: String = #fileID, line: Int = #line) -> SwiftProtobufError
This isn’t really an error. InputStream
documents that hasBytesAvailable
may return True
if a read is needed to determine if there really are bytes available. So this “error” is thrown when a parse
or merge
fails because there were no bytes available. If this is raised, the callers should decide via what ever other means are correct if the stream has completely ended or if more bytes might eventually show up.
static func tooLarge(function: String = #function, file: String = #fileID, line: Int = #line) -> SwiftProtobufError
Message is too large. Bytes and Strings have a max size of 2GB.