[libxml++/libxml++-2-40] Parser, Validator: Make handle_exception() private



commit 698d09e0e7894f86bbaced119a85b50a26a07db8
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Wed Oct 28 08:20:24 2015 +0100

    Parser, Validator: Make handle_exception() private
    
    * libxml++/exceptions/wrapped_exception.h: Added comment.
    * libxml++/parsers/parser.h:
    * libxml++/validators/validator.h: Make handle_exception() private. Then it
    will certainly not be considered added API, and it can be included in
    libxml++ 2.40.1. Bug #757042.

 libxml++/exceptions/wrapped_exception.h |    1 +
 libxml++/parsers/parser.h               |   11 ++++++++---
 libxml++/validators/validator.h         |    8 +++++---
 3 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/libxml++/exceptions/wrapped_exception.h b/libxml++/exceptions/wrapped_exception.h
index 3738680..3ed27db 100644
--- a/libxml++/exceptions/wrapped_exception.h
+++ b/libxml++/exceptions/wrapped_exception.h
@@ -31,6 +31,7 @@ namespace xmlpp
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
 /** Helper class for propagating an exception through C code.
  * Should not be used by applications.
+ * Does not exist in systems that don't support std::exception_ptr.
  *
  * @newin{2,40}
  */
diff --git a/libxml++/parsers/parser.h b/libxml++/parsers/parser.h
index 97c49df..332f6bf 100644
--- a/libxml++/parsers/parser.h
+++ b/libxml++/parsers/parser.h
@@ -26,6 +26,8 @@ extern "C" {
 
 namespace xmlpp {
 
+class SaxParserCallback; // Remove, when handle_exception() is made protected.
+
 /** XML parser.
  *
  */
@@ -163,10 +165,8 @@ protected:
   virtual void on_validity_warning(const Glib::ustring& message);
 
   //TODO: When we can break ABI/API, remove handleException() and make
-  // handle_exception() virtual.
+  // handle_exception() protected virtual.
   virtual void handleException(const exception& e);
-  /// To be called in an exception handler.
-  void handle_exception();
   virtual void check_for_exception();
 
   //TODO: In a future API/ABI-break, change the name of this function to
@@ -204,6 +204,11 @@ protected:
   //bool include_default_attributes_;
   //int set_options_;
   //int clear_options_;
+
+private:
+  friend SaxParserCallback; // Remove, when handle_exception() is made protected.
+  /// To be called in an exception handler.
+  void handle_exception();
 };
 
 /** Equivalent to Parser::parse_stream().
diff --git a/libxml++/validators/validator.h b/libxml++/validators/validator.h
index 6d4a5d8..05a7ed7 100644
--- a/libxml++/validators/validator.h
+++ b/libxml++/validators/validator.h
@@ -38,10 +38,8 @@ protected:
   virtual void on_validity_warning(const Glib::ustring& message);
 
   //TODO: When we can break ABI/API, remove handleException() and make
-  // handle_exception() virtual.
+  // handle_exception() protected virtual.
   virtual void handleException(const exception& e);
-  /// To be called in an exception handler.
-  void handle_exception();
   virtual void check_for_exception();
   virtual void check_for_validity_messages();
 
@@ -52,6 +50,10 @@ protected:
   exception* exception_;
   Glib::ustring validate_error_;
   Glib::ustring validate_warning_; //Built gradually - used in an exception at the end of parsing.
+
+private:
+  /// To be called in an exception handler.
+  void handle_exception();
 };
 
 } // namespace xmlpp


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