summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-12-16 09:11:18 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-12-16 09:13:18 +0100
commit107bcc88397f7167cf9599255f4e8c4de299e659 (patch)
tree464822d85a1675f13d04b956bf35f71ce7a013ed
parent1fbfe5cbc288ead6bba9d30ddb849dcb41a0d5e0 (diff)
cid#1374075 cid#1374076 Executable_pdfverify: uncaught exceptions
SAL_INFO() throwing std::length_error and other uninteresting cases. Change-Id: I841c7d81ff51c95ea60d63625e296f9886798f92
-rw-r--r--xmlsecurity/workben/pdfverify.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/xmlsecurity/workben/pdfverify.cxx b/xmlsecurity/workben/pdfverify.cxx
index 04c33d8fc139..92504fcba42d 100644
--- a/xmlsecurity/workben/pdfverify.cxx
+++ b/xmlsecurity/workben/pdfverify.cxx
@@ -22,7 +22,9 @@
using namespace com::sun::star;
-SAL_IMPLEMENT_MAIN_WITH_ARGS(nArgc, pArgv)
+namespace
+{
+int pdfVerify(int nArgc, char** pArgv)
{
if (nArgc < 2)
{
@@ -151,5 +153,19 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(nArgc, pArgv)
return 0;
}
+}
+
+SAL_IMPLEMENT_MAIN_WITH_ARGS(nArgc, pArgv)
+{
+ try
+ {
+ return pdfVerify(nArgc, pArgv);
+ }
+ catch (...)
+ {
+ std::cerr << "pdfverify: uncaught exception while invoking pdfVerify()" << std::endl;
+ return 1;
+ }
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */