File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -540,12 +540,12 @@ private struct JSONReader {
540
540
}
541
541
guard let separatorIndex = try consumeStructure ( Structure . NameSeparator, input: index) else {
542
542
throw NSError ( domain: NSCocoaErrorDomain, code: NSCocoaError . PropertyListReadCorruptError. rawValue, userInfo: [
543
- " NSDebugDescription " : " Invalid value at location \( source. distanceFromStart ( input ) ) "
543
+ " NSDebugDescription " : " Invalid separator at location \( source. distanceFromStart ( index ) ) "
544
544
] )
545
545
}
546
546
guard let ( value, finalIndex) = try parseValue ( separatorIndex) else {
547
547
throw NSError ( domain: NSCocoaErrorDomain, code: NSCocoaError . PropertyListReadCorruptError. rawValue, userInfo: [
548
- " NSDebugDescription " : " Invalid value at location \( source. distanceFromStart ( input ) ) "
548
+ " NSDebugDescription " : " Invalid value at location \( source. distanceFromStart ( separatorIndex ) ) "
549
549
] )
550
550
}
551
551
@@ -574,14 +574,9 @@ private struct JSONReader {
574
574
index = nextIndex
575
575
continue
576
576
}
577
- else {
578
- throw NSError ( domain: NSCocoaErrorDomain, code: NSCocoaError . PropertyListReadCorruptError. rawValue, userInfo: [
579
- " NSDebugDescription " : " Unexpected end of file while parsing array at location \( source. distanceFromStart ( input) ) "
580
- ] )
581
- }
582
577
}
583
578
throw NSError ( domain: NSCocoaErrorDomain, code: NSCocoaError . PropertyListReadCorruptError. rawValue, userInfo: [
584
- " NSDebugDescription " : " Unexpected end of file while parsing array at location \( source. distanceFromStart ( input ) ) "
579
+ " NSDebugDescription " : " Badly formed array at location \( source. distanceFromStart ( index ) ) "
585
580
] )
586
581
}
587
582
}
You can’t perform that action at this time.
0 commit comments