mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-03 18:09:29 +00:00
Catch exception and print message as appropriate
llvm-svn: 11594
This commit is contained in:
parent
72ce97cc95
commit
17d98cc298
@ -15,6 +15,7 @@
|
||||
|
||||
#include "BugDriver.h"
|
||||
#include "llvm/Support/PassNameParser.h"
|
||||
#include "llvm/Support/ToolRunner.h"
|
||||
#include "Support/CommandLine.h"
|
||||
#include "Config/unistd.h"
|
||||
#include <sys/resource.h>
|
||||
@ -52,6 +53,9 @@ int main(int argc, char **argv) {
|
||||
|
||||
try {
|
||||
return D.run();
|
||||
} catch (ToolExecutionError &TEE) {
|
||||
std::cerr << "Tool execution error: " << TEE.getMessage() << "\n";
|
||||
return 1;
|
||||
} catch (...) {
|
||||
std::cerr << "Whoops, an exception leaked out of bugpoint. "
|
||||
<< "This is a bug in bugpoint!\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user