From fc28010846da619686b62d77109fd14831109744 Mon Sep 17 00:00:00 2001 From: theraven Date: Wed, 16 Mar 2011 16:35:24 +0000 Subject: [PATCH] ...but don't catch foreign exceptions in catch statements for the boxing class's superclass. --- eh_personality.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eh_personality.c b/eh_personality.c index 81c4420..0b97340 100644 --- a/eh_personality.c +++ b/eh_personality.c @@ -157,11 +157,15 @@ static handler_type check_action_record(struct _Unwind_Context *context, return handler_catchall_id; } } - else if (isKindOfClass(thrown_class, type)) + else if (!foreignException && isKindOfClass(thrown_class, type)) { fprintf(stderr, "found handler for %s\n", type->name); return handler_class; } + else if (thrown_class == type) + { + return handler_class; + } } else if (filter == 0) {