From 14afc1f011a19643d52dfdd04678000ff440615a Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Fri, 8 Jan 2010 00:48:36 +0000 Subject: [PATCH] Switch from int to long in status code exception path. --- xmltooling/util/ReloadableXMLFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmltooling/util/ReloadableXMLFile.cpp b/xmltooling/util/ReloadableXMLFile.cpp index 03a8c90..db20c57 100644 --- a/xmltooling/util/ReloadableXMLFile.cpp +++ b/xmltooling/util/ReloadableXMLFile.cpp @@ -186,7 +186,7 @@ pair 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()); } -- 2.1.4