mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-11 02:51:11 +00:00
Better error message if transfer was cancelled
This commit is contained in:
1 parent
83a6ed7040
commit
c1defe9eee
1 file changed
+4
-1
@@ -323,7 +323,10 @@ class NearbyConnection {
|
||||
let chunk = payloadTransfer.payloadChunk
|
||||
|
||||
guard header.hasType, header.hasID else { throw NearbyError.requiredFieldMissing("payloadHeader.type|id") }
|
||||
guard payloadTransfer.hasPayloadChunk, chunk.hasOffset, chunk.hasFlags else { throw NearbyError.requiredFieldMissing("File transfer was likely canceled.") }
|
||||
guard payloadTransfer.hasPayloadChunk, chunk.hasOffset, chunk.hasFlags else {
|
||||
log("Payload transfer chunk is missing offset or flags, likely canceled.")
|
||||
throw NearbyError.canceled(reason: .userCanceled)
|
||||
}
|
||||
|
||||
if case .bytes = header.type {
|
||||
|
||||
|
||||
Reference in new issue
Block a user