ObjXMPP  Check-in [178390a16f]

Overview
Comment:Don't cache the description of exceptions.

This was pretty pointless, as it's usually only used once.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 178390a16f455d4c91538a9fba0d46e3ad59471829d2e812583b5108b4e8623e
User & Date: js on 2013-02-13 23:18:20
Other Links: manifest | tags
Context
2013-02-13
23:24
Fix missing ivars missing the underscore prefix. check-in: d6baa9982e user: js tags: trunk
23:18
Don't cache the description of exceptions. check-in: 178390a16f user: js tags: trunk
2013-02-12
21:36
Prefix all ivars with an underscore. check-in: 8dfcb87717 user: js tags: trunk
Changes

Modified src/XMPPExceptions.m from [b762333688] to [8fb736958d].

61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
61
62
63
64
65
66
67











68
69
70
71
72
73
74







-
-
-
-
-
-
-
-
-
-
-







- (void)dealloc
{
	[_connection release];

	[super dealloc];
}

- (OFString*)description
{
	if (_description != nil)
		return _description;

	_description = [[OFString alloc] initWithFormat:
	    @"An exception occurred in class %@!", _inClass];

	return _description;
}

- (XMPPConnection*)connection
{
	return _connection;
}
@end

@implementation XMPPStreamErrorException
128
129
130
131
132
133
134
135
136
137


138
139

140
141
142
143
144
145
146
147
148
117
118
119
120
121
122
123



124
125


126


127
128
129
130
131
132
133







-
-
-
+
+
-
-
+
-
-







	[reason release];

	[super dealloc];
}

- (OFString*)description
{
	if (_description != nil)
		return _description;

	return [OFString stringWithFormat:
	    @"Got stream error in class %@: %@. Reason: %@!", [self inClass],
	_description = [[OFString alloc] initWithFormat:
		@"Got stream error: %@. Reason: %@!", condition, reason];
	    condition, reason];

	return _description;
}

- (OFString*)condition
{
	return condition;
}

198
199
200
201
202
203
204
205
206
207

208
209
210


211
212
213
214
215
216
217
218
219
183
184
185
186
187
188
189



190



191
192


193
194
195
196
197
198
199







-
-
-
+
-
-
-
+
+
-
-







	[string release];

	[super dealloc];
}

- (OFString*)description
{
	if (_description != nil)
		return _description;

	return [OFString stringWithFormat:
	_description = [[OFString alloc] initWithFormat:
	    @"Stringprep with profile %@ failed on string '%@'!",
	    profile, string];
	    @"Stringprep with profile %@ failed in class %@ on string '%@'!",
	    profile, [self inClass], string];

	return _description;
}

- (OFString*)profile
{
	return profile;
}

269
270
271
272
273
274
275
276
277
278

279
280
281


282
283
284
285
286
287
288
289
249
250
251
252
253
254
255



256



257
258

259
260
261
262
263
264
265







-
-
-
+
-
-
-
+
+
-







	[string release];

	[super dealloc];
}

- (OFString*)description
{
	if (_description != nil)
		return _description;

	return [OFString stringWithFormat:
	_description = [[OFString alloc] initWithFormat:
	    @"IDNA operation %@ failed on string '%@'!", operation, string];

	    @"IDNA operation %@ failed in class %@ on string '%@'!", operation,
	    [self inClass], string];
	return _description;
}

- (OFString*)operation
{
	return operation;
}

334
335
336
337
338
339
340
341
342
343

344
345
346


347
348
349
350
351
352
353
354
310
311
312
313
314
315
316



317



318
319

320
321
322
323
324
325
326







-
-
-
+
-
-
-
+
+
-







	[reason release];

	[super dealloc];
}

- (OFString*)description
{
	if (_description != nil)
		return _description;

	return [OFString stringWithFormat:
	_description = [[OFString alloc] initWithFormat:
	    @"Authentication failed. Reason: %@!", reason];

	    @"Authentication failed in class %@. Reason: %@!", [self inClass],
	    reason];
	return _description;
}

- (OFString*)reason
{
	return reason;
}
@end