Index: trunk/psLib/src/types/psMetadata.c
===================================================================
--- trunk/psLib/src/types/psMetadata.c	(revision 12556)
+++ trunk/psLib/src/types/psMetadata.c	(revision 12572)
@@ -12,6 +12,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.157 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-03-22 15:34:04 $
+ *  @version $Revision: 1.158 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-03-23 23:25:02 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -463,6 +463,6 @@
         psMetadataItem *newItem = psMetadataItemCopy(inItem); // Copied item
         if (!psMetadataAddItem(out, newItem, PS_LIST_TAIL, flag)) {
-            psError(PS_ERR_UNKNOWN, false, "Error copying %s (%s) in the metadata\n", 
-		    inItem->name, inItem->comment);
+            psError(PS_ERR_UNKNOWN, false, "Error copying %s (%s) in the metadata\n",
+                    inItem->name, inItem->comment);
             if (outAlloced) {
                 psFree(out);
@@ -488,8 +488,8 @@
 // if any entries in 'in' a) do not exist in 'out' or b) have a different type
 bool p_psMetadataUpdate(const char *file,
-			unsigned int lineno,
-			const char *func,
-			psMetadata *out,
-			const psMetadata *in)
+                        unsigned int lineno,
+                        const char *func,
+                        psMetadata *out,
+                        const psMetadata *in)
 {
     PS_ASSERT_METADATA_NON_NULL(in, NULL);
@@ -513,6 +513,6 @@
         psMetadataItem *newItem = psMetadataItemCopy(inItem); // Copied item
         if (!psMetadataAddItem(out, newItem, PS_LIST_TAIL, flag)) {
-	    fprintf (stderr, "Error copying %s\n", inItem->name);
-	    result = false;
+            fprintf (stderr, "Error copying %s\n", inItem->name);
+            result = false;
         }
         psFree(newItem);                // Drop reference
@@ -521,6 +521,6 @@
 
     if (!result) {
-	psError(PS_ERR_UNKNOWN, false, "failed to update metadata\n");
-    }		    
+        psError(PS_ERR_UNKNOWN, false, "failed to update metadata\n");
+    }
     return result;
 }
@@ -614,8 +614,8 @@
             // replace entry instead of creating a duplicate entry.
 
-	    if ((flags & PS_META_REQUIRE_TYPE) && (existingEntry->type != item->type)) {
-		psError (PS_ERR_UNKNOWN, true, _("existing item does not match type for item requiring matching type"));
-		return false;
-	    }
+            if ((flags & PS_META_REQUIRE_TYPE) && (existingEntry->type != item->type)) {
+                psError (PS_ERR_UNKNOWN, true, _("Existing item %s does not match type (%x) for item requiring matching type (%x)"), key, existingEntry->type, item->type);
+                return false;
+            }
 
             // remove the existing entry from metadata
@@ -647,8 +647,9 @@
     } else {
         // OK, this is a new item.
-	if (flags & PS_META_REQUIRE_ENTRY) {
-	    psError (PS_ERR_UNKNOWN, true, _("no matching item found for item requiring existing entry"));
-	    return false;
-	}
+        if (flags & PS_META_REQUIRE_ENTRY) {
+            psError (PS_ERR_UNKNOWN, true, _("No matching item found for item requiring existing entry (%s)"),
+                     key);
+            return false;
+        }
 
         // Node doesn't exist - Add new metadata item to metadata collection's hash
