Index: trunk/pswarp/src/pswarpTransformReadout.c
===================================================================
--- trunk/pswarp/src/pswarpTransformReadout.c	(revision 26896)
+++ trunk/pswarp/src/pswarpTransformReadout.c	(revision 27096)
@@ -89,5 +89,5 @@
 
     if (!pmReadoutMaskNonfinite(input, pmConfigMaskGet("SAT", config))) {
-        psError(PS_ERR_UNKNOWN, false, "Unable to mask non-finite pixels in input.");
+        psError(psErrorCodeLast(), false, "Unable to mask non-finite pixels in input.");
         return false;
     }
@@ -129,5 +129,5 @@
             psArrayAdd(job->args, 1, args);
             if (!psThreadJobAddPending(job)) {
-                psError(PS_ERR_UNKNOWN, false, "Unable to warp image.");
+                psError(psErrorCodeLast(), false, "Unable to warp image.");
                 return false;
             }
@@ -140,5 +140,5 @@
     // wait here for the threaded jobs to finish
     if (!psThreadPoolWait (false)) {
-        psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image.");
+        psError(psErrorCodeLast(), false, "Unable to interpolate image.");
         return false;
     }
@@ -185,5 +185,5 @@
     if (goodPixels > 0) {
         if (!pswarpTransformSources(output, input, config)) {
-            psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image.");
+            psError(psErrorCodeLast(), false, "Unable to interpolate image.");
             return false;
         }
