Skip to content

Commit a0beed0

Browse files
WasmParser: Internalize WasmParserError enum cases
1 parent eda1d51 commit a0beed0

File tree

3 files changed

+180
-130
lines changed

3 files changed

+180
-130
lines changed

Sources/WasmParser/Stream/FileHandleStream.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public final class FileHandleStream: ByteStream {
3030
@discardableResult
3131
public func consumeAny() throws -> UInt8 {
3232
guard let consumed = try peek() else {
33-
throw WasmParserError.unexpectedEnd
33+
throw WasmParserError(.unexpectedEnd, offset: currentIndex)
3434
}
3535
currentIndex = bytes.index(after: currentIndex)
3636
return consumed

0 commit comments

Comments
 (0)