summaryrefslogtreecommitdiff
path: root/Build/source/libs/xpdf/xpdf-src/xpdf/pdfdetach.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/xpdf/xpdf-src/xpdf/pdfdetach.cc')
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/pdfdetach.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/pdfdetach.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/pdfdetach.cc
index 581383fe730..1b80fe474b6 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/pdfdetach.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/pdfdetach.cc
@@ -62,6 +62,10 @@ static ArgDesc argDesc[] = {
};
int main(int argc, char *argv[]) {
+#if USE_EXCEPTIONS
+ try {
+#endif
+
char *fileName;
UnicodeMap *uMap;
GString *ownerPW, *userPW;
@@ -213,4 +217,11 @@ int main(int argc, char *argv[]) {
gMemReport(stderr);
return exitCode;
+
+#if USE_EXCEPTIONS
+ } catch (GMemException e) {
+ fprintf(stderr, "Out of memory\n");
+ return 98;
+ }
+#endif
}