Ignore:
Timestamp:
2010-05-12T10:29:16+12:00 (14 years ago)
Author:
sjm84
Message:

Added error messages to these files that are printed when a write handle cannot be opened

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/dbutil/sqlite.pm

    r21872 r22076  
    4040  my $sqlite3_exe = &util::filename_cat($ENV{'GSDLHOME'},"bin",$ENV{'GSDLOS'}, "sqlite3" . &util::get_os_exe());
    4141  my $infodb_handle = undef;
    42   if (!-e "$sqlite3_exe" || !open($infodb_handle, "| \"$sqlite3_exe\" \"$infodb_file_path\""))
    43   {
    44     return undef;
     42
     43  if (!-e "$sqlite3_exe")
     44  {
     45      print STDERR "Error: Unable to find $sqlite3_exe\n";
     46      return undef;
     47  }
     48
     49  if(!open($infodb_handle, "| \"$sqlite3_exe\" \"$infodb_file_path\""))
     50  {
     51      print STDERR "Error: Failed to open pipe to \"$sqlite3_exe\" \"$infodb_file_path\"\n";
     52      print STDERR "       $!\n";
     53      return undef;
    4554  }
    4655
Note: See TracChangeset for help on using the changeset viewer.