Bug #6983 Exception stack trace lost when re-throwing exceptions

Submitted: 3 Dec 2004 11:10 Modified: 7 Dec 2004 16:39
Reporter: Sergey Koshcheyev Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:1.0.2 OS:Windows (WinXP)
Assigned to: Reggie Burnett CPU Architecture:Any

[3 Dec 2004 11:10] Sergey Koshcheyev
Description:
Hi,
in the source there are fragments like:

catch(Exception ex)
{
   do something;
   throw ex;
}

This leads to the exception losing its stack trace. To fix it, replace 'throw ex;' with just 'throw;'. (See http://dotnetguy.techieswithcats.com/archives/004118.shtml)

How to repeat:
Print a stack trace of any exception that is re-thrown in the above clause.

Suggested fix:
See description
[6 Dec 2004 7:46] Hartmut Holzgraefe
Not verified with running code but from reading the linked  
article i'd say the request is valid
[7 Dec 2004 16:39] Reggie Burnett
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Yes, it is indeed valid and has been fixed.  I made a note to fix these some time ago but never got around to it.  Thanks for posting the bug report.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.