Improve Delegate::Combine error message.
authorRodrigo Kumpera <kumpera@gmail.com>
Mon, 18 Jun 2012 15:12:50 +0000 (12:12 -0300)
committerRodrigo Kumpera <kumpera@gmail.com>
Mon, 18 Jun 2012 15:13:24 +0000 (12:13 -0300)
mcs/class/corlib/System/Delegate.cs
mcs/class/corlib/System/MulticastDelegate.cs

index 66925c6cb965fb3288e19a3b6891e710fa5c92cc..cfb8fdf171da11fa13b8643e243454b65c992883 100644 (file)
@@ -487,7 +487,7 @@ namespace System
                                        return a;
 
                        if (a.GetType () != b.GetType ())
-                               throw new ArgumentException (Locale.GetText ("Incompatible Delegate Types."));
+                               throw new ArgumentException (Locale.GetText ("Incompatible Delegate Types. First is {0} second is {1}.", a.GetType ().FullName, b.GetType ().FullName));
                        
                        return a.CombineImpl (b);
                }
index ba4d348eabab948f995128b09014085e3dfa546a..fe8be2651186ae32e9e7222d31287f2edd7a701e 100644 (file)
@@ -146,7 +146,7 @@ namespace System
                        MulticastDelegate combined, orig, clone;
 
                        if (this.GetType() != follow.GetType ())
-                               throw new ArgumentException (Locale.GetText ("Incompatible Delegate Types."));
+                               throw new ArgumentException (Locale.GetText ("Incompatible Delegate Types. First is {0} second is {1}.", this.GetType ().FullName, follow.GetType ().FullName));
 
                        combined = (MulticastDelegate)follow.Clone ();
                        combined.SetMulticastInvoke ();