소스 검색

apple: return informative error string when the whole request fails.

Closes #32.
Sasha Szpakowski 1 년 전
부모
커밋
6ccb7cb17c
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      src/apple/NSURLClient.mm

+ 5 - 0
src/apple/NSURLClient.mm

@@ -78,6 +78,11 @@ HTTPSClient::Reply NSURLClient::request(const HTTPSClient::Request &req)
 		}
 	}
 
+	if (reply.responseCode == 0 && body == nil && error != nil)
+	{
+		reply.body = toCppString(error.localizedDescription);
+	}
+
 	return reply;
 }}