From 252ad03d7db0add504fdcc6bd67c1bc1e28bdd57 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 28 Jul 2006 22:03:44 +0000 Subject: 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 --- lib/Bytecode/Archive/ArchiveWriter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Bytecode/Archive/ArchiveWriter.cpp') diff --git a/lib/Bytecode/Archive/ArchiveWriter.cpp b/lib/Bytecode/Archive/ArchiveWriter.cpp index 390fd12851..52ba99e805 100644 --- a/lib/Bytecode/Archive/ArchiveWriter.cpp +++ b/lib/Bytecode/Archive/ArchiveWriter.cpp @@ -159,7 +159,9 @@ Archive::addFileBefore(const sys::Path& filePath, iterator where) { mbr->data = 0; mbr->path = filePath; - mbr->path.getStatusInfo(mbr->info); + std::string err; + if (mbr->path.getFileStatus(mbr->info, &err)) + throw err; unsigned flags = 0; bool hasSlash = filePath.toString().find('/') != std::string::npos; -- cgit v1.2.3