[Mono-bugs] [Bug 81431][Nor] New - ArgumentException with BeginCatchBlock(type) following BeginExceptFilterBlock+BeginCatchBlock(null)
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Apr 23 08:16:43 EDT 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by rolfkvinge at ya.com.
http://bugzilla.ximian.com/show_bug.cgi?id=81431
--- shadow/81431 2007-04-23 08:16:43.000000000 -0400
+++ shadow/81431.tmp.21709 2007-04-23 08:16:43.000000000 -0400
@@ -0,0 +1,65 @@
+Bug#: 81431
+Product: Mono: Class Libraries
+Version: 1.0
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: rolfkvinge at ya.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: ArgumentException with BeginCatchBlock(type) following BeginExceptFilterBlock+BeginCatchBlock(null)
+
+The following program throws "System.ArgumentException: Do not supply an
+exception type for filter clause" on Mono, while it succeeds on MS.
+
+
+using System;
+using System.Collections;
+using System.Reflection;
+using System.Reflection.Emit;
+using System.Text;
+
+class vbnc_bugs
+{
+ static void Main ()
+ {
+ AssemblyBuilderAccess access =
+AssemblyBuilderAccess.RunAndSave;
+ TypeAttributes attribs = TypeAttributes.Public;
+
+ AssemblyName name = new AssemblyName ("a");
+ AssemblyBuilder assembly =
+AppDomain.CurrentDomain.DefineDynamicAssembly (name, access);
+
+ ModuleBuilder module = assembly.DefineDynamicModule ("m",
+"test.dll");
+
+ TypeBuilder t = module.DefineType ("T", attribs, null);
+ MethodBuilder m = t.DefineMethod ("M",
+MethodAttributes.Public);
+ ILGenerator il = m.GetILGenerator ();
+ il.BeginExceptionBlock ();
+ il.BeginExceptFilterBlock ();
+ il.BeginCatchBlock (null);
+ il.BeginCatchBlock (typeof (SystemException));
+ il.EndExceptionBlock ();
+
+ il.Emit (OpCodes.Ret);
+ t.CreateType ();
+ Console.WriteLine ("SUCCESS");
+ }
+}
+
+This corresponds to the following VB fragment:
+
+Try
+Catch When filter1
+Catch e3 As SystemException
+End Try
More information about the mono-bugs
mailing list