Skip to content

Commit 9f3d994

Browse files
authored
Better error message when debugging JSONParser (#15)
1 parent f5847a0 commit 9f3d994

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/PureSwiftJSONParsing/JSONParser.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public struct JSONParser {
2929
#if DEBUG
3030
defer {
3131
guard self.depth == 0 else {
32-
preconditionFailure()
32+
preconditionFailure("Expected to end parsing with a depth of 0")
3333
}
3434
}
3535
#endif

0 commit comments

Comments
 (0)