diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-11-06 10:18:19 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-11-06 12:16:05 +0000 |
commit | 8366909cd1ff58aa00f82565eb83c8af47672339 (patch) | |
tree | 6a54ca9410e729e021520a9848f0e369a8d9b90e /l10ntools | |
parent | a814812bdabf3e0e8b1e6de82bd73b26b4c5ec9e (diff) |
coverity#1338269 Uncaught exception
Change-Id: I32bfeb0ded37da05eecc97b92d9f724d59123fce
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/pocheck.cxx | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/l10ntools/source/pocheck.cxx b/l10ntools/source/pocheck.cxx index bdd3ad86a338..84be02913293 100644 --- a/l10ntools/source/pocheck.cxx +++ b/l10ntools/source/pocheck.cxx @@ -453,25 +453,33 @@ static void checkMathSymbolNames(const OString& aLanguage) int main() { - OString aLanguages(getenv("ALL_LANGS")); - if( aLanguages.isEmpty() ) + try { - std::cerr << "Usage: bin/run pocheck\n"; - return 1; + OString aLanguages(getenv("ALL_LANGS")); + if( aLanguages.isEmpty() ) + { + std::cerr << "Usage: bin/run pocheck\n"; + return 1; + } + for(sal_Int32 i = 1;;++i) // skip en-US + { + OString aLanguage = aLanguages.getToken(i,' '); + if( aLanguage.isEmpty() ) + break; + if( aLanguage == "qtz" ) + continue; + checkStyleNames(aLanguage); + checkFunctionNames(aLanguage); + checkVerticalBar(aLanguage); + checkMathSymbolNames(aLanguage); + } + return 0; } - for(sal_Int32 i = 1;;++i) // skip en-US + catch (std::exception& e) { - OString aLanguage = aLanguages.getToken(i,' '); - if( aLanguage.isEmpty() ) - break; - if( aLanguage == "qtz" ) - continue; - checkStyleNames(aLanguage); - checkFunctionNames(aLanguage); - checkVerticalBar(aLanguage); - checkMathSymbolNames(aLanguage); + std::cerr << "pocheck: exception " << e.what() << std::endl; + return 1; } - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |