[llvm-commits] CVS: llvm/tools/bugpoint/bugpoint.cpp
Reid Spencer
reid at x10sys.com
Wed Dec 29 21:36:23 PST 2004
Changes in directory llvm/tools/bugpoint:
bugpoint.cpp updated: 1.22 -> 1.23
---
Log message:
For PR351: http://llvm.cs.uiuc.edu/PR351 :
* Place a try/catch block around the entire tool to Make sure std::string
exceptions are caught and printed before exiting the tool.
* Make sure we catch unhandled exceptions at the top level so that we don't
abort with a useless message but indicate than an unhandled exception was
generated.
---
Diffs of the changes: (+3 -2)
Index: llvm/tools/bugpoint/bugpoint.cpp
diff -u llvm/tools/bugpoint/bugpoint.cpp:1.22 llvm/tools/bugpoint/bugpoint.cpp:1.23
--- llvm/tools/bugpoint/bugpoint.cpp:1.22 Mon Dec 27 00:18:02 2004
+++ llvm/tools/bugpoint/bugpoint.cpp Wed Dec 29 23:36:07 2004
@@ -51,10 +51,11 @@
return D.run();
} catch (ToolExecutionError &TEE) {
std::cerr << "Tool execution error: " << TEE.what() << '\n';
- return 1;
+ } catch (const std::string& msg) {
+ std::cerr << argv[0] << ": " << msg << "\n";
} catch (...) {
std::cerr << "Whoops, an exception leaked out of bugpoint. "
<< "This is a bug in bugpoint!\n";
- return 1;
}
+ return 1;
}
More information about the llvm-commits
mailing list