mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 10:58:58 +00:00
Code tidy re-throwing of exceptions
Avoid copying exceptions.
This commit is contained in:
parent
1e53da74bc
commit
9c7aa2cbbd
@ -899,7 +899,7 @@ NNTreeImpl::find(QPDFObjectHandle key, bool return_prev_if_not_found)
|
||||
repair();
|
||||
return findInternal(key, return_prev_if_not_found);
|
||||
} else {
|
||||
throw e;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -500,7 +500,7 @@ QPDF::parse(char const* password)
|
||||
reconstruct_xref(e);
|
||||
QTC::TC("qpdf", "QPDF reconstructed xref table");
|
||||
} else {
|
||||
throw e;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1483,7 +1483,7 @@ QPDF::readObject(
|
||||
warn(e);
|
||||
length = recoverStreamLength(input, og, stream_offset);
|
||||
} else {
|
||||
throw e;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
object = newIndirect(
|
||||
@ -1684,7 +1684,7 @@ QPDF::readObjectAtOffset(
|
||||
return QPDFObjectHandle::newNull();
|
||||
}
|
||||
} else {
|
||||
throw e;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -469,7 +469,7 @@ QPDFJob::createQPDF()
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
throw e;
|
||||
throw;
|
||||
}
|
||||
QPDF& pdf = *pdf_sp;
|
||||
if (pdf.isEncrypted()) {
|
||||
@ -1968,11 +1968,11 @@ QPDFJob::doProcess(
|
||||
try {
|
||||
doProcessOnce(pdf, fn, *iter, empty, used_for_input, main_input);
|
||||
return;
|
||||
} catch (QPDFExc& e) {
|
||||
} catch (QPDFExc&) {
|
||||
auto next = iter;
|
||||
++next;
|
||||
if (next == passwords.end()) {
|
||||
throw e;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
if (!warned) {
|
||||
|
Loading…
Reference in New Issue
Block a user