adium 4344:a9c976eec029: Catch all exceptions that occur in non-...
commits at adium.im
commits at adium.im
Sat Dec 3 12:00:32 UTC 2011
details: http://hg.adium.im/adium/rev/a9c976eec029
revision: 4344:a9c976eec029
branch: (none)
author: Thijs Alkemade <thijsalkemade at gmail.com>
date: Sat Dec 03 12:55:43 2011 +0100
Catch all exceptions that occur in non-delayed content filters.
I'm not sure this is the best way to handle exceptions, but it's better than
letting them go uncaught: if AIContentController never reaches
-finishReceiveContentObject:, the message will get stuck in
objectsBeingReceived, causing -[AIChatController closeChat:] to never want to
close the chat and Adium will hang when quitting.
diffs (17 lines):
diff -r bd1e35256e80 -r a9c976eec029 Source/AdiumContentFiltering.m
--- a/Source/AdiumContentFiltering.m Fri Dec 02 15:35:05 2011 -0800
+++ b/Source/AdiumContentFiltering.m Sat Dec 03 12:55:43 2011 +0100
@@ -230,7 +230,12 @@
context:filterContext
uniqueID:uniqueID];
} else {
- *attributedString = [(id <AIContentFilter>)filter filterAttributedString:*attributedString context:filterContext];
+ @try {
+ *attributedString = [(id <AIContentFilter>)filter filterAttributedString:*attributedString context:filterContext];
+ }
+ @catch (NSException *exception) {
+ AILogWithSignature(@"Caught exception in content %@: %@", filter, exception);
+ }
}
}
More information about the commits
mailing list