Changeset 1628 for trunk/yat/utility/OptionFile.cc
- Timestamp:
- Nov 17, 2008, 10:24:18 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/OptionFile.cc
r1487 r1628 48 48 return; 49 49 FileUtil fu(value().c_str()); 50 if (exist_ && !fu.exists()){ 50 bool exists=false; 51 try { 52 exists = fu.exists(); 53 } 54 catch (IO_error& e) { 55 std::stringstream ss; 56 ss << "cannot stat `" << value() << "': " << strerror(errno); 57 errno = 0; 58 throw cmd_error(ss.str()); 59 } 60 if (exist_ && !exists){ 51 61 std::stringstream ss; 52 62 ss << "cannot stat `" << value() << "': No such file or directory"; … … 58 68 if (*iter=='r' && fu.permissions("r")){ 59 69 std::stringstream ss; 60 ss << "cannot stat `" << value() << "': No such file or directory";70 ss << "cannot open `" << value() << "' for reading: Permission denied"; 61 71 throw cmd_error(ss.str()); 62 72 }
Note: See TracChangeset
for help on using the changeset viewer.