2
1
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:
m-holger 2023-03-19 16:57:27 +00:00
parent 1e53da74bc
commit 9c7aa2cbbd
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();
return findInternal(key, return_prev_if_not_found);
} else {
throw e;
throw;
}
}
}

View File

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

View File

@ -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) {