]> git.openstreetmap.org Git - nominatim.git/commitdiff
make import-osmosis(-all) fail with error code!=0
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 25 Sep 2013 21:05:47 +0000 (23:05 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 25 Sep 2013 21:05:47 +0000 (23:05 +0200)
utils/update.php

index ba0a5c2643ec510ac388b8a678f8c7eea80837aa..533b48d69cec465dcdf71ad6e90da19939f8f2b1 100755 (executable)
                                if ($iErrorLevel)
                                {
                                        echo "Error: $iErrorLevel\n";
-                                       exit;
+                                       exit($iErrorLevel);
                                }
                                echo "Completed for $sBatchEnd in ".round((time()-$fCMDStartTime)/60,2)." minutes\n";
                                $sSQL = "INSERT INTO import_osmosis_log values ('$sBatchEnd',$iFileSize,'".date('Y-m-d H:i:s',$fCMDStartTime)."','".date('Y-m-d H:i:s')."','osm2pgsql')";
                                if (PEAR::isError($iFileID))
                                {
                                        echo $iFileID->getMessage()."\n";
-                                       exit;
+                                       exit(-1);
                                } 
                                $sFileDir = CONST_BasePath.'/export/diff/';
                                $sFileDir .= str_pad(floor($iFileID/1000000), 3, '0', STR_PAD_LEFT);
                                if ($iErrorLevel)
                                {
                                        echo "Error: $iErrorLevel\n";
-                                       exit;
+                                       exit($iErrorLevel);
                                }
 
                                if (!$aResult['no-npi'])
                                        if ($iErrorLevel)
                                        {
                                                echo "Error: $iErrorLevel\n";
-                                               exit;
+                                               exit($iErrorLevel);
                                        }
 
                                        rename($sFileDir.'/'.str_pad($iFileID % 1000, 3, '0', STR_PAD_LEFT).".npi.out.bz2",