mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +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:
@ -49,8 +49,12 @@ void CLIDebugger::startProgramRunning() {
|
||||
eliminateRunInfo();
|
||||
|
||||
// If the program has been modified, reload it!
|
||||
sys::Path Program (Dbg.getProgramPath());
|
||||
if (TheProgramInfo->getProgramTimeStamp() != Program.getTimestamp()) {
|
||||
sys::Path Program(Dbg.getProgramPath());
|
||||
sys::FileStatus Status;
|
||||
std::string Err;
|
||||
if (Program.getFileStatus(Status, &Err))
|
||||
throw Err;
|
||||
if (TheProgramInfo->getProgramTimeStamp() != Status.getTimestamp()) {
|
||||
std::cout << "'" << Program << "' has changed; re-reading program.\n";
|
||||
|
||||
// Unload an existing program. This kills the program if necessary.
|
||||
|
Reference in New Issue
Block a user