[gtk/gtk-3-24: 1/5] Handle NSException from removeItemAtIndex.
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 1/5] Handle NSException from removeItemAtIndex.
- Date: Thu, 30 Jan 2020 19:48:21 +0000 (UTC)
commit 81c42faa5aa723a27209484dcfb1e14c6452e37a
Author: John Ralls <jralls ceridwen us>
Date: Wed Dec 18 21:00:29 2019 -0800
Handle NSException from removeItemAtIndex.
gtk/gtkapplication-quartz-menu.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkapplication-quartz-menu.c b/gtk/gtkapplication-quartz-menu.c
index 0e2567fca7..0ed90f3207 100644
--- a/gtk/gtkapplication-quartz-menu.c
+++ b/gtk/gtkapplication-quartz-menu.c
@@ -393,8 +393,15 @@ menu_item_removed (gint position,
gpointer user_data)
{
GNSMenu *menu = user_data;
-
- [menu removeItemAtIndex:position];
+ @try
+ {
+ [menu removeItemAtIndex:position];
+ }
+ @catch(NSException *err)
+ {
+ g_critical("GNSMenu removeItemAtIndex: %d raised exception %s", position,
+ [[err reason] UTF8String]);
+ }
}
@implementation GNSMenu
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]