[Mono-bugs] [Bug 419634] New: catch(Exception){throw; } within a catch block is throwing the previous exception

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Aug 22 14:58:06 EDT 2008


           Summary: catch(Exception){throw;} within a catch block is
                    throwing the previous exception
           Product: Mono: Runtime
           Version: 1.2.6
          Platform: 64bit
        OS/Version: openSUSE 10.2
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: rajneeshpatel at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Other

Within a catch block e.g catch(ApplicationException ae) if you have a nested
try/catch block with a catch(Exception){throw;} the ApplicationException is
thrown instead of the Exception caught by catch(Exception)

                throw new ApplicationException();
            catch (ApplicationException ae)
                    throw new IOException();
                catch (Exception)

So in the above case, in windows .NET, the IOException is thrown but in mono on
unix, the ApplicationException is thrown

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list