Index: /trunk/psLib/src/fits/psFitsHeader.c
===================================================================
--- /trunk/psLib/src/fits/psFitsHeader.c	(revision 22431)
+++ /trunk/psLib/src/fits/psFitsHeader.c	(revision 22432)
@@ -666,5 +666,6 @@
                 break;
               default:  // all other META types are ignored
-                psError("Unable to write metadata item %s of type %x to FITS header\n",
+                psError(PS_ERR_IO, true,
+                        "Unable to write metadata item %s of type %x to FITS header",
                         item->name, item->type);
                 return false;
