2009-07-26 Miguel de Icaza <miguel@novell.com>
authorMiguel de Icaza <miguel@gnome.org>
Sun, 26 Jul 2009 23:48:12 +0000 (23:48 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Sun, 26 Jul 2009 23:48:12 +0000 (23:48 -0000)
* ILGenerator.cs: Fix the exception thrown when LocalBuilders are
mixed between ILGenerators.

svn path=/trunk/mcs/; revision=138709

mcs/class/corlib/System.Reflection.Emit/ChangeLog
mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs

index 1cf9ea581ab9aed49b572f02b10002f7a7038744..cb050929c850aca5895613f0dcdb48fe2e6b0597 100644 (file)
@@ -1,3 +1,8 @@
+2009-07-26  Miguel de Icaza  <miguel@novell.com>
+
+       * ILGenerator.cs: Fix the exception thrown when LocalBuilders are
+       mixed between ILGenerators.
+
 2009-07-24 Rodrigo Kumpera  <rkumpera@novell.com>
 
        * TypeBuilder.cs: Make the interfaces field internal.
index cdd64fb3987b57fda1f6623150452fe8785b8f1b..d865ff4b761279574d7aa4d47485853ac42ea258 100644 (file)
@@ -680,7 +680,7 @@ namespace System.Reflection.Emit {
                        make_room (6);
 
                        if (local.ilgen != this)
-                               throw new Exception ("Trying to emit a local from a different ILGenerator.");
+                               throw new ArgumentException ("Trying to emit a local from a different ILGenerator.");
 
                        /* inline the code from ll_emit () to optimize il code size */
                        if (opcode.StackBehaviourPop == StackBehaviour.Pop1) {