mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 17:24:48 +00:00
Change Path::getStatusInfo to return a boolean and error string on an error
instead of throwing an exception. This reduces the amount of code that is exposed to exceptions (e.g. FileUtilities), though it is clearly only one step along the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29395 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -104,12 +104,14 @@ void ArchiveMember::replaceWith(const sys::Path& newFile) {
|
||||
flags &= ~HasLongFilenameFlag;
|
||||
|
||||
// Get the signature and status info
|
||||
std::string magic;
|
||||
const char* signature = (const char*) data;
|
||||
std::string magic;
|
||||
if (!signature) {
|
||||
path.getMagicNumber(magic,4);
|
||||
signature = magic.c_str();
|
||||
path.getStatusInfo(info);
|
||||
std::string err;
|
||||
if (path.getFileStatus(info, &err))
|
||||
throw err;
|
||||
}
|
||||
|
||||
// Determine what kind of file it is
|
||||
|
Reference in New Issue
Block a user