From c59185013ea1c422898fb499012e69edfee721c5 Mon Sep 17 00:00:00 2001 From: Florian Zeitz Date: Sun, 10 Feb 2013 18:01:20 +0100 Subject: [PATCH] Fix selector for exception handling in XMPPConnection --- src/XMPPConnection.m | 4 ++-- tests/test.m | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/XMPPConnection.m b/src/XMPPConnection.m index 5a2a7ee..22c8ba8 100644 --- a/src/XMPPConnection.m +++ b/src/XMPPConnection.m @@ -443,7 +443,7 @@ { if (exception != nil) { [delegates broadcastSelector: @selector(connection: - didThrowException::) + didThrowException:) withObject: self withObject: exception]; [self close]; @@ -456,7 +456,7 @@ return NO; } @catch (id e) { [delegates broadcastSelector: @selector(connection: - didThrowException::) + didThrowException:) withObject: self withObject: e]; [self close]; diff --git a/tests/test.m b/tests/test.m index e38f2e3..9a31d84 100644 --- a/tests/test.m +++ b/tests/test.m @@ -220,6 +220,12 @@ OF_APPLICATION_DELEGATE(AppDelegate) of_log(@"Presence: %@", pres); } +- (void)connection: (XMPPConnection*)conn + didThrowException: (id)e +{ + @throw e; +} + - (void)connectionWasClosed: (XMPPConnection*)conn { of_log(@"Connection was closed!");