Index: /trunk/pois/src/errorCodes-skl.c
===================================================================
--- /trunk/pois/src/errorCodes-skl.c	(revision 3809)
+++ /trunk/pois/src/errorCodes-skl.c	(revision 3809)
@@ -0,0 +1,32 @@
+/*
+ * The lines between
+ *   //~Start TEMPLATE
+ * and
+ *   //~End
+ * will be machine generated from errorCodes.dat
+ */
+#include "pslib.h"
+#include "poisErrorCodes.h"
+
+void poisErrorRegister(void)
+{
+    static psErrorDescription errors[] = {
+       { POIS_ERR_BASE, "First value we use; lower values belong to psLib" },
+       //~Start       {POIS_ERR_$1, "$2"},
+       {POIS_ERR_UNKNOWN, "Unknown POIS error code"},
+       {POIS_ERR_NOT_IMPLEMENTED, "Desired feature is not yet implemented"},
+       {POIS_ERR_FITS, "Problem in FITS I/O"},
+       {POIS_ERR_FITS_WCS, "Error interpreting FITS WCS information"},
+       //~End
+    };
+    static int nerror = POIS_ERR_NERROR - POIS_ERR_BASE; // number of values in enum
+
+    for (int i = 0; i < nerror; i++) {
+       psErrorDescription *tmp = psAlloc(sizeof(psErrorDescription));
+	p_psMemSetPersistent(tmp, true);
+       *tmp = errors[i];
+       psErrorRegister(tmp, 1);
+       psFree(tmp);			/* it's on the internal list */
+    }
+    nerror = 0;			                // don't register more than once
+}
Index: /trunk/pois/src/errorCodes-skl.h
===================================================================
--- /trunk/pois/src/errorCodes-skl.h	(revision 3809)
+++ /trunk/pois/src/errorCodes-skl.h	(revision 3809)
@@ -0,0 +1,23 @@
+#if !defined(POIS_ERROR_CODES_H)
+#define POIS_ERROR_CODES_H
+/*
+ * The lines between
+ *   //~Start TEMPLATE
+ * and
+ *   //~End
+ * will be machine generated from errorCodes.dat
+ */
+typedef enum {
+    POIS_ERR_BASE = 512,
+    //~Start    POIS_ERR_$1,
+    POIS_ERR_UNKNOWN,
+    POIS_ERR_NOT_IMPLEMENTED,
+    POIS_ERR_FITS,
+    POIS_ERR_FITS_WCS,
+    //~End
+    POIS_ERR_NERROR
+} poisErrorCode;
+
+void poisErrorRegister(void);
+
+#endif
Index: /trunk/pois/src/errorCodes.dat
===================================================================
--- /trunk/pois/src/errorCodes.dat	(revision 3809)
+++ /trunk/pois/src/errorCodes.dat	(revision 3809)
@@ -0,0 +1,11 @@
+#
+# This file is used to generate poisErrorClasses.h
+#
+BASE = 512		First value we use; lower values belong to psLib
+UNKNOWN			Unknown POIS error code
+NOT_IMPLEMENTED		Desired feature is not yet implemented
+FITS			Problem in FITS I/O
+FITS_WCS		Error interpreting FITS WCS information
+SWIG			Problem in SWIG bindings
+UNSUPPORTED_TYPE	The datatype is not supported for this operation
+
