summaryrefslogtreecommitdiff
path: root/tools/bugpoint/bugpoint.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-18 20:22:11 +0000
committerChris Lattner <sabre@nondot.org>2004-02-18 20:22:11 +0000
commit230fef8b11a9faa7eda31c34a22a3085e2aa8e04 (patch)
tree9bd5f45c35529cf788491d71d7ff807a14de760b /tools/bugpoint/bugpoint.cpp
parent8c56be5e2b860ce5f22ed157c1b02409c353749c (diff)
downloadllvm-230fef8b11a9faa7eda31c34a22a3085e2aa8e04.tar.gz
llvm-230fef8b11a9faa7eda31c34a22a3085e2aa8e04.tar.bz2
llvm-230fef8b11a9faa7eda31c34a22a3085e2aa8e04.tar.xz
Catch exception and print message as appropriate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11594 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/bugpoint.cpp')
-rw-r--r--tools/bugpoint/bugpoint.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/bugpoint/bugpoint.cpp b/tools/bugpoint/bugpoint.cpp
index 779359e73c..3c89dce525 100644
--- a/tools/bugpoint/bugpoint.cpp
+++ b/tools/bugpoint/bugpoint.cpp
@@ -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";