[Mono-dev] Exception not carrying .Msg when thrown from IL called constructor.

Lucas Meijer lucas at lucasmeijer.com
Thu Jan 8 09:06:54 EST 2009

Excuse the verbose subjectline :)

When investigating the necessary steps to get NInject to work on Mono, I 
found several failing tests.
One category of failing tests boil down to the following behaviour. It 
looks like a bug to me, but I could be wrong.
The attached repro program prints out "SomeImportantMessage" on the CLR, 
and prints out "" on mono.

It looks like the .Msg property of an exception thrown in a constructor 
is not available to a catchblock, if the constructor
was called trough dynamically generated IL.

If someone can confirm I'm not doing anything silly, and this is indeed 
a bug, I'll file a bugzilla on it.
I tested on 2.0 and svn trunk.

Bye, Lucas
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: MonoTest1.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090108/f5671b9e/attachment.pl 

More information about the Mono-devel-list mailing list