2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-05-29 00:10:54 +00:00

Merge pull request #930 from m-holger/throw

Code tidy re-throwing of exceptions
This commit is contained in:
Jay Berkenbilt 2023-04-01 09:42:52 -04:00 committed by GitHub
commit 40e4d1f97c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -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;
} }
} }
} }

View File

@ -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;
} }
} }

View File

@ -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()) {
@ -1969,11 +1969,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) {