[libxml++] Fix the build without exceptions, hopefully.



commit 56398ab7b7e619a7fc23315e6a5960ccbcfadbe7
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu May 7 18:00:24 2009 +0200

    Fix the build without exceptions, hopefully.
    
    * libxml++/parsers/textreader.cc: check_for_exceptions():
    Add an ifdef so that this should build with exceptions disabled,
    though there is no alternative API yet. Noticed by David King.
---
 ChangeLog                      |    8 ++++++++
 libxml++/parsers/textreader.cc |    3 +++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 595a820..62c0dd0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-05-07  Murray Cumming  <murrayc murrayc-x61>
+
+	Fix the build without exceptions, hopefully.
+
+	* libxml++/parsers/textreader.cc: check_for_exceptions(): 
+	Add an ifdef so that this should build with exceptions disabled, 
+	though there is no alternative API yet. Noticed by David King.
+
 2009-05-07  Murray Cumming  <murrayc murrayc com>
 
 	* libxml++/parsers/textreader.cc: Whitespace corrections.
diff --git a/libxml++/parsers/textreader.cc b/libxml++/parsers/textreader.cc
index a6dbe8a..1d6532d 100644
--- a/libxml++/parsers/textreader.cc
+++ b/libxml++/parsers/textreader.cc
@@ -377,10 +377,13 @@ void TextReader::check_for_exceptions() const
   int severity = severity_;
   ths->severity_ = 0;
 
+  //TODO: Offer an alternative when not using exceptions?
+  #ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
   if( severity == XML_PARSER_SEVERITY_ERROR )
     throw parse_error(error_);
   else if( severity == XML_PARSER_SEVERITY_VALIDITY_ERROR )
     throw validity_error(error_);
+  #endif //LIBXMLCPP_EXCEPTIONS_ENABLED
 }
 
 int TextReader::PropertyReader::Int(int value)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]