Switch from int to long in status code exception path.
authorcantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Fri, 8 Jan 2010 00:48:36 +0000 (00:48 +0000)
committercantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Fri, 8 Jan 2010 00:48:36 +0000 (00:48 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/branches/REL_1@705 de75baf8-a10c-0410-a50a-987c0e22f00f

xmltooling/util/ReloadableXMLFile.cpp

index 03a8c90..db20c57 100644 (file)
@@ -186,7 +186,7 @@ pair<bool,DOMElement*> ReloadableXMLFile::load(bool backup)
                     int responseCode = XMLString::parseInt(doc->getDocumentElement()->getFirstChild()->getNodeValue());
                     doc->release();
                     if (responseCode == HTTPResponse::XMLTOOLING_HTTP_STATUS_NOTMODIFIED) {
-                        throw responseCode; // toss out as a "known" case to handle gracefully
+                        throw (long)responseCode; // toss out as a "known" case to handle gracefully
                     }
                     else {
                         m_log.warn("remote resource fetch returned atypical status code (%d)", responseCode);
@@ -297,7 +297,7 @@ Lockable* ReloadableXMLFile::lock()
         if (ret.first)
             ret.second->getOwnerDocument()->release();
     }
-    catch (int& ex) {
+    catch (long& ex) {
         if (ex == HTTPResponse::XMLTOOLING_HTTP_STATUS_NOTMODIFIED) {
             m_log.info("remote resource (%s) unchanged from cached version", m_source.c_str());
         }