Description: Do not leak memory with description string when throwing
 exception.
Author: Jérémy Coulon <jeremy.coulon@free.fr>
Last-Update: 2011-02-24

Index: unstable/src/dom-api/impl/XPath2ResultImpl.cpp
===================================================================
--- unstable.orig/src/dom-api/impl/XPath2ResultImpl.cpp	2011-02-24 11:28:27.000000000 +0200
+++ unstable/src/dom-api/impl/XPath2ResultImpl.cpp	2011-02-24 11:28:59.000000000 +0200
@@ -150,7 +150,7 @@
 int XPath2ResultImpl::getIntegerValue() const
 {
   if(_currentItem.isNull()) {
-    throw XQillaException(DOMException::INVALID_STATE_ERR, XMLString::transcode("There is no current result in the result")); 
+    throw XQillaException(DOMException::INVALID_STATE_ERR, X("There is no current result in the result")); 
   }
 
   return FunctionNumber::number(_currentItem, _context, 0)->asInt();
@@ -159,7 +159,7 @@
 double XPath2ResultImpl::getNumberValue() const
 {
   if(_currentItem.isNull()) {
-    throw XQillaException(DOMException::INVALID_STATE_ERR, XMLString::transcode("There is no current result in the result"));
+    throw XQillaException(DOMException::INVALID_STATE_ERR, X("There is no current result in the result"));
   }
 
   return FunctionNumber::number(_currentItem, _context, 0)->asDouble();
@@ -168,7 +168,7 @@
 const XMLCh* XPath2ResultImpl::getStringValue() const
 {
   if(_currentItem.isNull()) {
-    throw XQillaException(DOMException::INVALID_STATE_ERR, XMLString::transcode("There is no current result in the result"));
+    throw XQillaException(DOMException::INVALID_STATE_ERR, X("There is no current result in the result"));
   }
 
   return FunctionString::string(_currentItem, _context);
@@ -177,7 +177,7 @@
 bool XPath2ResultImpl::getBooleanValue() const
 {
   if(_currentItem.isNull()) {
-    throw XQillaException(DOMException::INVALID_STATE_ERR, XMLString::transcode("There is no current result in the result"));
+    throw XQillaException(DOMException::INVALID_STATE_ERR, X("There is no current result in the result"));
   }
 
   if(!_currentItem->isAtomicValue()) {
@@ -197,7 +197,7 @@
 DOMNode* XPath2ResultImpl::getNodeValue() const
 {
   if(_currentItem.isNull()) {
-    throw XQillaException(DOMException::INVALID_STATE_ERR, XMLString::transcode("There is no current result in the result"));
+    throw XQillaException(DOMException::INVALID_STATE_ERR, X("There is no current result in the result"));
   }
 
   if(!_currentItem->isNode()) {
@@ -484,7 +484,7 @@
 {
   // check for document changes
   if(getInvalidIteratorState()) {
-    throw XQillaException(DOMException::INVALID_STATE_ERR, XMLString::transcode("Document has changed"));
+    throw XQillaException(DOMException::INVALID_STATE_ERR, X("Document has changed"));
   }
 
   try {
