Skip to content

Commit

Permalink
Remove precondition
Browse files Browse the repository at this point in the history
  • Loading branch information
fummicc1 committed Dec 17, 2024
1 parent 420c005 commit 3393052
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Sources/GeoHashFramework/GeoHash.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,13 @@ extension GeoHash {

for char in geoHash {
guard let index = Self.base32Chars.firstIndex(of: char) else {
preconditionFailure(
"Invalid geohash character \(char) in geoHash: \(geoHash)"
)
Task {
await runtimeWarning.log(
message: "Invalid geohash character %s in geoHash: %s",
args: String(char), geoHash
)
}
continue
}

let value = Self.base32Chars.distance(
Expand Down

0 comments on commit 3393052

Please sign in to comment.