mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-03 15:17:29 +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();
|
repair();
|
||||||
return findInternal(key, return_prev_if_not_found);
|
return findInternal(key, return_prev_if_not_found);
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -500,7 +500,7 @@ QPDF::parse(char const* password)
|
|||||||
reconstruct_xref(e);
|
reconstruct_xref(e);
|
||||||
QTC::TC("qpdf", "QPDF reconstructed xref table");
|
QTC::TC("qpdf", "QPDF reconstructed xref table");
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1483,7 +1483,7 @@ QPDF::readObject(
|
|||||||
warn(e);
|
warn(e);
|
||||||
length = recoverStreamLength(input, og, stream_offset);
|
length = recoverStreamLength(input, og, stream_offset);
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
object = newIndirect(
|
object = newIndirect(
|
||||||
@ -1684,7 +1684,7 @@ QPDF::readObjectAtOffset(
|
|||||||
return QPDFObjectHandle::newNull();
|
return QPDFObjectHandle::newNull();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,7 +469,7 @@ QPDFJob::createQPDF()
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw e;
|
throw;
|
||||||
}
|
}
|
||||||
QPDF& pdf = *pdf_sp;
|
QPDF& pdf = *pdf_sp;
|
||||||
if (pdf.isEncrypted()) {
|
if (pdf.isEncrypted()) {
|
||||||
@ -1968,11 +1968,11 @@ QPDFJob::doProcess(
|
|||||||
try {
|
try {
|
||||||
doProcessOnce(pdf, fn, *iter, empty, used_for_input, main_input);
|
doProcessOnce(pdf, fn, *iter, empty, used_for_input, main_input);
|
||||||
return;
|
return;
|
||||||
} catch (QPDFExc& e) {
|
} catch (QPDFExc&) {
|
||||||
auto next = iter;
|
auto next = iter;
|
||||||
++next;
|
++next;
|
||||||
if (next == passwords.end()) {
|
if (next == passwords.end()) {
|
||||||
throw e;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!warned) {
|
if (!warned) {
|
||||||
|
Loading…
Reference in New Issue
Block a user