File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 11## 2.4.0-wip
22
33* Switch to ` package:objective_c ` ` 8.1.0 ` and ` package:ffigen ` ` 19.1.0 ` .
4-
4+ * Add URL to thrown ` RequestAbortedException ` .
5+
56## 2.3.0
67
78* Add the ability to abort requests.
Original file line number Diff line number Diff line change @@ -207,14 +207,18 @@ class CupertinoClient extends BaseClient {
207207 // 2. The user aborts the request, which can happen at any point in the
208208 // request lifecycle and causes `CupertinoClient.send` to throw
209209 // a `RequestAbortedException` exception.
210+ //
211+ // In both of these cases [URLSessionTask.cancel] is called, which completes
212+ // the task with a NSURLErrorCancelled error.
210213 final isCancelError =
211214 error? .domain.toDartString () == 'NSURLErrorDomain' &&
212215 error? .code == _nsurlErrorCancelled;
213216 if (error != null &&
214217 ! (isCancelError && taskTracker.responseListenerCancelled)) {
215218 final Exception exception;
216219 if (isCancelError) {
217- exception = RequestAbortedException ();
220+ assert (taskTracker.requestAborted);
221+ exception = RequestAbortedException (taskTracker.request.url);
218222 } else {
219223 exception = NSErrorClientException (error, taskTracker.request.url);
220224 }
You can’t perform that action at this time.
0 commit comments