cerr<<Phrases::Error<<"Unable to create working copy for \""<<name<<"\": an IO error occurred when opening original file \""<<origFilePath<<"\"."<<Phrases::EndFlush;
cerr<<Phrases::Error<<"Unable to create working copy for \""<<name<<"\": an IO error occurred when opening target file \""<<workingCopyPath<<"\"."<<Phrases::EndFlush;
returnstring();
}
workingCopy<<origFile.rdbuf();
if(!origFile.fail()&&!workingCopy.fail()){
returnworkingCopyPath;
}catch(...){
catchIoFailure();
cerr<<Phrases::Error<<"Unable to create working copy for \""<<name<<"\": an IO error occurred when copying \""<<origFilePath
<<"\" to \""<<workingCopyPath<<"\"."<<Phrases::EndFlush;
}
cerr<<Phrases::Error<<"Unable to create working copy for \""<<name<<"\": ";
if(origFile.fail()){
cerr<<"an IO error occurred when reading original file \""<<origFilePath<<"\"";
returnstring();
}
if(workingCopy.fail()){
if(origFile.fail()){
cerr<<" and ";
}
cerr<<" an IO error occurred when writing to target file \""<<workingCopyPath<<"\".";