[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 68b9a5d 2/3: Without developer-only password,
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 68b9a5d 2/3: Without developer-only password, preserve old PDF behavior exactly |
Date: |
Fri, 9 Mar 2018 13:08:23 -0500 (EST) |
branch: master
commit 68b9a5dce2fa138166b7ac0aa371f7488fd1a3c4
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Without developer-only password, preserve old PDF behavior exactly
Any std::exception thrown by old PDF code has now been made to propagate
normally by default. Iff the developer-only password is used, then any
such std::exception is handled by writing its what() string to stderr
and resuming where the new PDF code is optionally invoked. The intention
had been to trap XSL-FO errors, but throw_if_interdicted()'s exception
was trapped as a side effect; end users don't normally run in a console,
and would therefore be unaware of the exception.
---
ledger_pdf.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ledger_pdf.cpp b/ledger_pdf.cpp
index 8feaca2..850ac3b 100644
--- a/ledger_pdf.cpp
+++ b/ledger_pdf.cpp
@@ -55,7 +55,9 @@ std::string write_ledger_as_pdf(Ledger const& ledger,
fs::path const& filepath)
bool const pyx_only_old = contains(g.pyx(), "only_old_pdf");
bool const do_the_old = ash_nazg ? !pyx_only_new : true;
bool const skip_the_new = ash_nazg ? pyx_only_old : true;
- // PDF !! Expunge this conditional block and the defns above:
+ // Without secret password, preserve old behavior exactly:
+ if(!ash_nazg) return write_ledger_as_pdf_via_xsl(ledger, filepath);
+ // PDF !! Expunge this conditional block and everything above it:
if(do_the_old)
{
std::string z;