Index: trunk/ippScripts/scripts/warp_overlap.pl
===================================================================
--- trunk/ippScripts/scripts/warp_overlap.pl	(revision 17788)
+++ trunk/ippScripts/scripts/warp_overlap.pl	(revision 17792)
@@ -97,7 +97,8 @@
 }
 
+
+
 # Determine the imfile/skycell overlaps
 my @overlaps = ();
-
 unless ($no_op) {
     # Calculate the overlaps between imfiles and skycells
@@ -156,7 +157,8 @@
 }
 
-# XXX this file needs some additional error checking: if no overlaps are found, we
+# If no overlaps are found, we
 # keep running this step over and over (a successful warptool -addoverlap prevents
 # successive warptime -imfile from running.
+&my_die("Unable to find any overlaps", $warp_id, $PS_EXIT_PROG_ERROR) if scalar @overlaps == 0;
 
 # Generate a MDC file with the overlaps
@@ -197,7 +199,12 @@
     my $exit_code = shift;      # Exit code to add
 
-    warn($msg);
-
-    # No failure option on warptool for this mode, so just die.
+    carp($msg);
+    if (defined $warp_id and not $no_update) {
+        my $command = "$warptool -addoverlap";
+        $command .= " -warp_id $warp_id";
+        $command .= " -code $exit_code";
+        $command .= " -dbname $dbname" if defined $dbname;
+        system ($command);
+    }
     exit $exit_code;
 }
