2008-07-10 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Thu, 10 Jul 2008 14:32:47 +0000 (14:32 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Thu, 10 Jul 2008 14:32:47 +0000 (14:32 -0000)
* XmlSerializationWriter.cs : more helpful error message.

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

mcs/class/System.XML/System.Xml.Serialization/ChangeLog
mcs/class/System.XML/System.Xml.Serialization/XmlSerializationWriter.cs

index 89a199f708d83155479ff4624cb242d2407d2918..e985baadde5a5040be03bd14f1c14def96abc9ed 100644 (file)
@@ -1,3 +1,7 @@
+2008-07-10  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * XmlSerializationWriter.cs : more helpful error message.
+
 2008-07-09  Atsushi Enomoto  <atsushi@ximian.com>
 
        * MapCodeGenerator.cs : use explicit element name for explicitly added
index 60d5c5f470c61da86920591de1ebafc7486d37a5..f4c49c2f155f59daa07f79c7f459d06af70aa3bf 100644 (file)
@@ -873,7 +873,7 @@ namespace System.Xml.Serialization
                        string value;
                        TypeData td = TypeTranslator.GetTypeData (o.GetType ());
                        if (td.SchemaType != SchemaTypes.Primitive)
-                               throw new InvalidOperationException ("The type of the argument object is not primitive.");
+                               throw new InvalidOperationException (String.Format ("The type of the argument object '{0}' is not primitive.", td.FullTypeName));
 
                        if (name == null) {
                                ns = td.IsXsdType ? XmlSchema.Namespace : XmlSerializer.WsdlTypesNamespace;