Fix selector for exception handling in XMPPConnection

This commit is contained in:
Florian Zeitz 2013-02-10 18:01:20 +01:00
parent a221f4bd38
commit c59185013e
2 changed files with 8 additions and 2 deletions

View file

@ -443,7 +443,7 @@
{ {
if (exception != nil) { if (exception != nil) {
[delegates broadcastSelector: @selector(connection: [delegates broadcastSelector: @selector(connection:
didThrowException::) didThrowException:)
withObject: self withObject: self
withObject: exception]; withObject: exception];
[self close]; [self close];
@ -456,7 +456,7 @@
return NO; return NO;
} @catch (id e) { } @catch (id e) {
[delegates broadcastSelector: @selector(connection: [delegates broadcastSelector: @selector(connection:
didThrowException::) didThrowException:)
withObject: self withObject: self
withObject: e]; withObject: e];
[self close]; [self close];

View file

@ -220,6 +220,12 @@ OF_APPLICATION_DELEGATE(AppDelegate)
of_log(@"Presence: %@", pres); of_log(@"Presence: %@", pres);
} }
- (void)connection: (XMPPConnection*)conn
didThrowException: (id)e
{
@throw e;
}
- (void)connectionWasClosed: (XMPPConnection*)conn - (void)connectionWasClosed: (XMPPConnection*)conn
{ {
of_log(@"Connection was closed!"); of_log(@"Connection was closed!");