From 996ec72d48e86d16dc14b1c014be4c13d2f1f686 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Thu, 30 Dec 2004 05:36:08 +0000 Subject: For 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. llvm-svn: 19192 --- llvm/tools/llvmc/llvmc.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/tools/llvmc') diff --git a/llvm/tools/llvmc/llvmc.cpp b/llvm/tools/llvmc/llvmc.cpp index fe365058945..fd416b2b57c 100644 --- a/llvm/tools/llvmc/llvmc.cpp +++ b/llvm/tools/llvmc/llvmc.cpp @@ -368,4 +368,5 @@ int main(int argc, char **argv) { } catch (...) { std::cerr << argv[0] << ": Unexpected unknown exception occurred.\n"; } + return 1; } -- cgit v1.2.3