ObjMatrix  Check-in [99420a37d1]

Overview
Comment:MTXRequest: Improve handling of failed requests
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 99420a37d13d7e0922f1f14b3ae5a679caeb1ad16ac8f0bc7e4587131880fba0
User & Date: js on 2020-10-03 15:28:53
Other Links: manifest | tags
Context
2020-10-03
15:30
ObjMatrix.oc: Remove ObjSQLite3 dependency check-in: 91648879e2 user: js tags: trunk
15:28
MTXRequest: Improve handling of failed requests check-in: 99420a37d1 user: js tags: trunk
15:06
Add .github check-in: 48f9fdb1d6 user: js tags: trunk
Changes

Modified src/MTXRequest.m from [eb5d497f5c] to [eb63bbbdde].

153
154
155
156
157
158
159











160
161
162
163
164
165
166
	[self release];
}

-	  (void)client: (OFHTTPClient *)client
  didFailWithException: (id)exception
	       request: (OFHTTPRequest *)request
{











	/* Reset to nil first, so that another one can be performed. */
	mtx_request_block_t block = _block;
	_block = nil;

	block(nil, 0, exception);

	[block release];







>
>
>
>
>
>
>
>
>
>
>







153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
	[self release];
}

-	  (void)client: (OFHTTPClient *)client
  didFailWithException: (id)exception
	       request: (OFHTTPRequest *)request
{
	/*
	 * Convert OFHTTPRequestFailedException into a response, so that we
	 * still get the JSON for the failed request.
	 */
	if ([exception isKindOfClass: OFHTTPRequestFailedException.class]) {
		[self	       client: client
		    didPerformRequest: request
			     response: [exception response]];
		return;
	}

	/* Reset to nil first, so that another one can be performed. */
	mtx_request_block_t block = _block;
	_block = nil;

	block(nil, 0, exception);

	[block release];