Bug 35838 - [csharp] Missing exception frame when executing on .NET
Summary: [csharp] Missing exception frame when executing on .NET
Status: RESOLVED ANSWERED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: 4.0.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2015-11-13 11:52 UTC by Sandy Armstrong [MSFT]
Modified: 2015-11-16 03:06 UTC (History)
1 user (show)

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

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 GitHub or Developer Community 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:
Status:
RESOLVED ANSWERED

Description Sandy Armstrong [MSFT] 2015-11-13 11:52:56 UTC
On Mono:

csharp> class A{public void Throw(){throw new Exception("bye");}}
csharp> new A().Throw()
System.Exception: bye
  at A.Throw () [0x00000] in <filename unknown>:0
  at <InteractiveExpressionClass>.Host (System.Object& $retval) [0x00000] in <filename unknown>:0
  at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) [0x00000] in <filename unknown>:0
  at Mono.CSharpShell.Evaluate (System.String input) [0x00000] in <filename unknown>:0


On .NET:

csharp> class A{public void Throw(){throw new Exception("yo");}}
csharp> new A().Throw()
System.Exception: yo
   at <InteractiveExpressionClass>.Host(Object& $retval)
   at Mono.CSharp.Evaluator.Evaluate(String input, Object& result, Boolean& result_set)
   at Mono.CSharpShell.Evaluate(String input)


Note the missing "at A.Throw" frame.

Noticed this in the Inspector when inspecting WPF apps (the only time we run Mono.CSharp on .NET).
Comment 1 Marek Safar 2015-11-16 03:06:48 UTC
This looks to me like .net bug. I am not sure how can I fix .net exception handling from from SRE generated code.