diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-11-06 10:17:01 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-11-06 12:16:05 +0000 |
commit | a814812bdabf3e0e8b1e6de82bd73b26b4c5ec9e (patch) | |
tree | d50749d3925da8c4327ddfe3b0fc48a4ca2bec07 /l10ntools | |
parent | fb1a18d6c1cb315defc1f7cd20167015274f296e (diff) |
coverity#1338268 Uncaught exception
Change-Id: Id954d556c2b65772025b8aaabdbfa9ed4ae7a9b7
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/localize.cxx | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx index 5c107a6a3a6b..e12ffc014ee2 100644 --- a/l10ntools/source/localize.cxx +++ b/l10ntools/source/localize.cxx @@ -453,19 +453,29 @@ void handleProjects(char * sSourceRoot, char const * sDestRoot) } } -SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) { - if (argc != 3) { - cerr - << ("localize (c)2001 by Sun Microsystems\n\n" - "As part of the L10N framework, localize extracts en-US\n" - "strings for translation out of the toplevel modules defined\n" - "in projects array in l10ntools/source/localize.cxx.\n\n" - "Syntax: localize <source-root> <outfile>\n"); - exit(EXIT_FAILURE); - } - try { +SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) +{ + try + { + if (argc != 3) + { + cerr + << ("localize (c)2001 by Sun Microsystems\n\n" + "As part of the L10N framework, localize extracts en-US\n" + "strings for translation out of the toplevel modules defined\n" + "in projects array in l10ntools/source/localize.cxx.\n\n" + "Syntax: localize <source-root> <outfile>\n"); + exit(EXIT_FAILURE); + } handleProjects(argv[1],argv[2]); - } catch (bool) { //TODO + } + catch (std::exception& e) + { + cerr << "exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } + catch (bool) //TODO + { return EXIT_FAILURE; } return EXIT_SUCCESS; |