From cd339f9ddc0f78cfef3890395e1ef35184636888 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 17 Feb 2005 01:20:44 +0000 Subject: [PATCH] (parse_and_report): If XML support was not compiled in, generate an error when the "xml" command is used. --- main.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.cc b/main.cc index d1874f1b..4dd2c9e5 100644 --- a/main.cc +++ b/main.cc @@ -452,9 +452,13 @@ def vmax(d, val):\n\ formatter = new format_entries(*out, *format); else if (command == "x") formatter = new format_emacs_transactions(*out); - else if (command == "X") + else if (command == "X") { +#ifdef HAVE_XMLPARSE formatter = new format_xml_entries(*out, config.show_totals); - else +#else + throw error("XML support was not compiled into this copy of Ledger"); +#endif + } else formatter = new format_transactions(*out, *format); if (command == "w") {