Bug 1856 - Wrong stack trace when exception is re-thrown
Summary: Wrong stack trace when exception is re-thrown
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: JIT (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Alexander Kyte
URL:
Depends on:
Blocks:
 
Reported: 2011-11-03 10:54 UTC by Marek Safar
Modified: 2015-06-22 11:47 UTC (History)
2 users (show)

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


Attachments

Description Marek Safar 2011-11-03 10:54:02 UTC
using System;

class C
{
	static Exception e;
	
	static void Throw ()
	{
		try {
			int.Parse (null);
		} catch (Exception ex) {
			e = ex;
		}
	}
	
	public static void Main ()
	{
		Throw ();
		
		try {
			throw e;
		} catch (Exception ex) {
			Console.WriteLine (ex.StackTrace);
		}
	}
}

.NET
   at C.Main()

Mono
  at System.Int32.Parse (System.String s) [0x00000] in <filename unknown>:0 
  at C.Throw () [0x00000] in <filename unknown>:0

Note You need to log in before you can comment on or make changes to this bug.