Skip to content

Commit e17c61c

Browse files
authored
Instead of crashing with unknown types in print, use description (#5207)
1 parent 51be7d1 commit e17c61c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/plutil/PLUContext.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,9 @@ struct PrintCommand {
772772
let description = number.description
773773
result.append("\(description)\n")
774774
} else {
775-
throw PLUContextError.argument("Unknown property list type")
775+
// Use a generic description
776+
result.append(String(describing: value))
777+
result.append("\n")
776778
}
777779
return result
778780
}

0 commit comments

Comments
 (0)