summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-11-06 10:17:01 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-11-06 12:16:05 +0000
commita814812bdabf3e0e8b1e6de82bd73b26b4c5ec9e (patch)
treed50749d3925da8c4327ddfe3b0fc48a4ca2bec07 /l10ntools
parentfb1a18d6c1cb315defc1f7cd20167015274f296e (diff)
coverity#1338268 Uncaught exception
Change-Id: Id954d556c2b65772025b8aaabdbfa9ed4ae7a9b7
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/localize.cxx34
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;