aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFExc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf/QPDFExc.cc')
-rw-r--r--libqpdf/QPDFExc.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/libqpdf/QPDFExc.cc b/libqpdf/QPDFExc.cc
index 728d4ce8..b816e913 100644
--- a/libqpdf/QPDFExc.cc
+++ b/libqpdf/QPDFExc.cc
@@ -32,7 +32,10 @@ QPDFExc::createWhat(std::string const& filename,
}
if (! (object.empty() && offset == 0))
{
- result += " (";
+ if (! filename.empty())
+ {
+ result += " (";
+ }
if (! object.empty())
{
result += object;
@@ -45,7 +48,10 @@ QPDFExc::createWhat(std::string const& filename,
{
result += "offset " + QUtil::int_to_string(offset);
}
- result += ")";
+ if (! filename.empty())
+ {
+ result += ")";
+ }
}
if (! result.empty())
{