Bug 37744 - Exceptions are not caught properly
Summary: Exceptions are not caught properly
Status: RESOLVED DUPLICATE of bug 37273
Alias: None
Product: iOS
Classification: Xamarin
Component: Mono runtime / AOT compiler ()
Version: XI 9.4 (iOS 9.2)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Zoltan Varga
Depends on:
Reported: 2016-01-16 09:40 UTC by Grigory (Playtika)
Modified: 2016-01-18 15:57 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Repro (2.34 MB, application/zip)
2016-01-16 09:40 UTC, Grigory (Playtika)

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Grigory (Playtika) 2016-01-16 09:40:52 UTC
Created attachment 14606 [details]

In release builds exceptions of invalid types are caught.

Try running Repro in Debug and then in Release.
In Release invalid exception behavior can be observed.

Following block shouldn't execute, but in Release it does!
 catch (NotExpectedException e)
                    Console.Out.WriteLine("RepeatRequestStep NotExpectedException[{0}]", e.GetType());
                    if (trialNo >= 3)
Comment 1 Zoltan Varga 2016-01-18 15:57:45 UTC

*** This bug has been marked as a duplicate of bug 37273 ***