[libxml++] Node: Correct mis-spelt LIBXMLCPP_EXCEPTIONS_ENABLED.



commit 8dc38b7981f65c4e1ee21d3560a5d1b6278d71c8
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Wed Feb 15 15:33:22 2012 +0100

    Node: Correct mis-spelt LIBXMLCPP_EXCEPTIONS_ENABLED.
    
    * libxml++/nodes/node.h: Add some "@throws exception".
    * libxml++/nodes/node.cc: Change LIBXMLCPP_EXCEPTIONS_ENABLE to
    LIBXMLCPP_EXCEPTIONS_ENABLED in find_impl() and set_namespace().

 ChangeLog              |    8 ++++++++
 libxml++/nodes/node.cc |    6 +++---
 libxml++/nodes/node.h  |    7 +++++++
 3 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e84c148..8d87906 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2012-02-15  Kjell Ahlstedt  <kjell ahlstedt bredband net>
 
+	Node: Correct mis-spelt LIBXMLCPP_EXCEPTIONS_ENABLED.
+
+	* libxml++/nodes/node.h: Add some "@throws exception".
+	* libxml++/nodes/node.cc: Change LIBXMLCPP_EXCEPTIONS_ENABLE to
+	LIBXMLCPP_EXCEPTIONS_ENABLED in find_impl() and set_namespace().
+
+2012-02-15  Kjell Ahlstedt  <kjell ahlstedt bredband net>
+
 	Improved handling of entity references and processing instructions.
 
 	* libxml++/nodes/entitydeclaration.[h|cc]: New files.
diff --git a/libxml++/nodes/node.cc b/libxml++/nodes/node.cc
index 36494a4..ef70bfc 100644
--- a/libxml++/nodes/node.cc
+++ b/libxml++/nodes/node.cc
@@ -284,7 +284,7 @@ static NodeSet find_impl(xmlXPathContext* ctxt, const Glib::ustring& xpath)
     xmlXPathFreeObject(result);
     xmlXPathFreeContext(ctxt);
 
-    #ifdef LIBXMLCPP_EXCEPTIONS_ENABLE
+    #ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
     throw internal_error("Only nodeset result types are supported.");
     #else
     return NodeSet();
@@ -400,9 +400,9 @@ void Node::set_namespace(const Glib::ustring& ns_prefix)
   }
   else
   {
-    #ifdef LIBXMLCPP_EXCEPTIONS_ENABLE
+    #ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
     throw exception("The namespace (" + ns_prefix + ") has not been declared.");
-    #endif //LIBXMLCPP_EXCEPTIONS_ENABLE
+    #endif //LIBXMLCPP_EXCEPTIONS_ENABLED
   }
 }
 
diff --git a/libxml++/nodes/node.h b/libxml++/nodes/node.h
index 35dd97d..9b8e909 100644
--- a/libxml++/nodes/node.h
+++ b/libxml++/nodes/node.h
@@ -54,6 +54,7 @@ public:
   /** Set the namespace prefix used by the node.
    * If no such namespace prefix has been declared then this method will throw an exception.
    * @param ns_prefix The namespace prefix.
+   * @throws exception
    */
   void set_namespace(const Glib::ustring& ns_prefix);
 
@@ -111,6 +112,7 @@ public:
    * @param name The new node name
    * @param ns_prefix The namespace prefix. If the prefix has not been declared then this method will throw an exception.
    * @returns The newly-created element
+   * @throws exception
    */
   Element* add_child(const Glib::ustring& name,
                      const Glib::ustring& ns_prefix = Glib::ustring());
@@ -123,6 +125,7 @@ public:
    * @param name The new node name
    * @param ns_prefix The namespace prefix. If the prefix has not been declared then this method will throw an exception.
    * @returns The newly-created element
+   * @throws exception
    */
   Element* add_child(xmlpp::Node* previous_sibling, const Glib::ustring& name,
                      const Glib::ustring& ns_prefix = Glib::ustring());
@@ -135,6 +138,7 @@ public:
    * @param name The new node name
    * @param ns_prefix The namespace prefix. If the prefix has not been declared then this method will throw an exception.
    * @returns The newly-created element
+   * @throws exception
    */
   Element* add_child_before(xmlpp::Node* next_sibling, const Glib::ustring& name,
                      const Glib::ustring& ns_prefix = Glib::ustring());
@@ -148,6 +152,7 @@ public:
    * @param node The node to copy and insert under the current node.
    * @param recursive Whether to import the child nodes also. Defaults to true.
    * @returns The newly-created node.
+   * @throws exception
    */
   Node* import_node(const Node* node, bool recursive = true);
 
@@ -159,6 +164,7 @@ public:
 
   /** Find nodes from a XPath expression.
    * @param xpath The XPath of the nodes.
+   * @throws exception
    */
   NodeSet find(const Glib::ustring& xpath) const;
 
@@ -169,6 +175,7 @@ public:
   /** Find nodes from a XPath expression.
    * @param xpath The XPath of the nodes.
    * @param namespaces A map of namespace prefixes to namespace URIs to be used while finding.
+   * @throws exception
    */
   NodeSet find(const Glib::ustring& xpath, const PrefixNsMap& namespaces) const;
 



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