visuddhinanda преди 4 години
родител
ревизия
38df8451bf
променени са 1 файла, в които са добавени 5 реда и са изтрити 2 реда
  1. 5 2
      app/install/db_insert_wordindex_from_csv_cli.php

+ 5 - 2
app/install/db_insert_wordindex_from_csv_cli.php

@@ -45,7 +45,8 @@ try{
 				try{
 				try{
 					$stmt = $dbh_word_index->prepare($query);
 					$stmt = $dbh_word_index->prepare($query);
 				}catch(PDOException $e){
 				}catch(PDOException $e){
-					fwrite(STDERR,"error:".$e->getMessage());
+					fwrite(STDERR,"error:".$e->getMessage()." At Line: ".$e->getLine().PHP_EOL);
+					exit;
 				}
 				}
                 
                 
         
         
@@ -54,7 +55,9 @@ try{
 					try{
 					try{
 						$stmt->execute($data);
 						$stmt->execute($data);
 					}catch(PDOException $e){
 					}catch(PDOException $e){
-						fwrite(STDERR,"error:".$e->getMessage());
+						fwrite(STDERR,"error:".$e->getMessage()." At Line: ".$e->getLine().PHP_EOL);
+						fwrite(STDERR,"error-data:".implode(",",$data).PHP_EOL);
+						exit;
 					}
 					}
                     
                     
                     $count++;
                     $count++;