<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[11288] CalendarServer/trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.calendarserver.org//changeset/11288">11288</a></dd>
<dt>Author</dt> <dd>wsanchez@apple.com</dd>
<dt>Date</dt> <dd>2013-06-03 14:51:40 -0700 (Mon, 03 Jun 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Test bogus arg to log.err().
Separate the log.err() sub-tests into separate tests.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServertrunktwextpythonlogpy">CalendarServer/trunk/twext/python/log.py</a></li>
<li><a href="#CalendarServertrunktwextpythontesttest_logpy">CalendarServer/trunk/twext/python/test/test_log.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavdirectorycalendaruserproxyloaderpy">CalendarServer/trunk/twistedcaldav/directory/calendaruserproxyloader.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavdirectoryxmlaccountsparserpy">CalendarServer/trunk/twistedcaldav/directory/xmlaccountsparser.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavdirectoryxmlaugmentsparserpy">CalendarServer/trunk/twistedcaldav/directory/xmlaugmentsparser.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoreschedulingischedulelocalserverspy">CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/localservers.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunktwextpythonlogpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twext/python/log.py (11287 => 11288)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twext/python/log.py        2013-06-03 20:46:37 UTC (rev 11287)
+++ CalendarServer/trunk/twext/python/log.py        2013-06-03 21:51:40 UTC (rev 11288)
</span><span class="lines">@@ -339,10 +339,8 @@
</span><span class="cx">     #
</span><span class="cx">     # Attach methods to Logger
</span><span class="cx">     #
</span><del>-    def log_emit(self, message=None, raiseException=None, **kwargs):
</del><ins>+    def log_emit(self, message=None, **kwargs):
</ins><span class="cx">         self.emit(level, message, **kwargs)
</span><del>-        if raiseException:
-            raise raiseException(message)
</del><span class="cx"> 
</span><span class="cx">     def will_emit(self):
</span><span class="cx">         return self.willLogAtLevel(level)
</span></span></pre></div>
<a id="CalendarServertrunktwextpythontesttest_logpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twext/python/test/test_log.py (11287 => 11288)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twext/python/test/test_log.py        2013-06-03 20:46:37 UTC (rev 11287)
+++ CalendarServer/trunk/twext/python/test/test_log.py        2013-06-03 21:51:40 UTC (rev 11288)
</span><span class="lines">@@ -329,60 +329,100 @@
</span><span class="cx">         self.assertIdentical(log.emitted[&quot;message&quot;], None)
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-    def test_legacy_err(self):
</del><ins>+    def test_legacy_err_implicit(self):
</ins><span class="cx">         &quot;&quot;&quot;
</span><del>-        Test LegacyLogger's log.err()
</del><ins>+        Test LegacyLogger's log.err() capturing the in-flight exception.
</ins><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         log = TestLegacyLogger()
</span><span class="cx"> 
</span><span class="cx">         exception = RuntimeError(&quot;Oh me, oh my.&quot;)
</span><span class="cx">         kwargs = { &quot;foo&quot;: &quot;bar&quot;, &quot;obj&quot;: object() }
</span><ins>+
+        try:
+            raise exception
+        except RuntimeError:
+            log.err(**kwargs)
+
+        self.legacy_err(log, kwargs, None, exception)
+
+
+    def test_legacy_err_exception(self):
+        &quot;&quot;&quot;
+        Test LegacyLogger's log.err() with a given exception.
+        &quot;&quot;&quot;
+        log = TestLegacyLogger()
+
+        exception = RuntimeError(&quot;Oh me, oh my.&quot;)
+        kwargs = { &quot;foo&quot;: &quot;bar&quot;, &quot;obj&quot;: object() }
</ins><span class="cx">         why = &quot;Because I said so.&quot;
</span><span class="cx"> 
</span><del>-        def implicit():
-            try:
-                raise exception
-            except RuntimeError:
-                log.err(**kwargs)
</del><ins>+        try:
+            raise exception
+        except RuntimeError as e:
+            log.err(e, why, **kwargs)
</ins><span class="cx"> 
</span><del>-        def withException():
-            try:
-                raise exception
-            except RuntimeError as e:
-                log.err(e, why, **kwargs)
</del><ins>+        self.legacy_err(log, kwargs, why, exception)
</ins><span class="cx"> 
</span><del>-        def withFailure():
-            try:
-                raise exception
-            except RuntimeError:
-                log.err(Failure(), why, **kwargs)
</del><span class="cx"> 
</span><del>-        def withBogus():
-            try:
-                raise exception
-            except RuntimeError:
-                log.err(object(), why, **kwargs)
</del><ins>+    def test_legacy_err_failure(self):
+        &quot;&quot;&quot;
+        Test LegacyLogger's log.err() with a given L{Failure}.
+        &quot;&quot;&quot;
+        log = TestLegacyLogger()
</ins><span class="cx"> 
</span><del>-        for rabbleRouser in (implicit, withException, withFailure):
-            rabbleRouser()
</del><ins>+        exception = RuntimeError(&quot;Oh me, oh my.&quot;)
+        kwargs = { &quot;foo&quot;: &quot;bar&quot;, &quot;obj&quot;: object() }
+        why = &quot;Because I said so.&quot;
</ins><span class="cx"> 
</span><del>-            #
-            # log.failure() will cause trial to complain, so here we check that
-            # trial saw the correct error and remove it from the list of things to
-            # complain about.
-            #
-            errors = self.flushLoggedErrors(RuntimeError)
-            self.assertEquals(len(errors), 1)
</del><ins>+        try:
+            raise exception
+        except RuntimeError:
+            log.err(Failure(), why, **kwargs)
</ins><span class="cx"> 
</span><del>-            self.assertIdentical(log.emitted[&quot;level&quot;], LogLevel.error)
-            self.assertIdentical(log.emitted[&quot;message&quot;], None)
-            self.assertIdentical(log.emitted[&quot;kwargs&quot;][&quot;failure&quot;].__class__, Failure)
-            self.assertIdentical(log.emitted[&quot;kwargs&quot;][&quot;failure&quot;].value, exception)
</del><ins>+        self.legacy_err(log, kwargs, why, exception)
</ins><span class="cx"> 
</span><del>-            if rabbleRouser is implicit:
-                self.assertIdentical(log.emitted[&quot;kwargs&quot;][&quot;why&quot;], None)
-            else:
-                self.assertIdentical(log.emitted[&quot;kwargs&quot;][&quot;why&quot;], why)
</del><span class="cx"> 
</span><del>-            for key, value in kwargs.items():
-                self.assertIdentical(log.emitted[&quot;kwargs&quot;][key], value)
</del><ins>+    def test_legacy_err_bogus(self):
+        &quot;&quot;&quot;
+        Test LegacyLogger's log.err() with a bogus argument.
+        &quot;&quot;&quot;
+        log = TestLegacyLogger()
+
+        exception = RuntimeError(&quot;Oh me, oh my.&quot;)
+        kwargs = { &quot;foo&quot;: &quot;bar&quot;, &quot;obj&quot;: object() }
+        why = &quot;Because I said so.&quot;
+        bogus = object()
+
+        try:
+            raise exception
+        except RuntimeError:
+            log.err(bogus, why, **kwargs)
+
+        errors = self.flushLoggedErrors(exception.__class__)
+        self.assertEquals(len(errors), 0)
+
+        self.assertIdentical(log.emitted[&quot;level&quot;], LogLevel.error)
+        self.assertEquals(log.emitted[&quot;message&quot;], repr(bogus))
+        self.assertIdentical(log.emitted[&quot;kwargs&quot;][&quot;why&quot;], why)
+
+        for key, value in kwargs.items():
+            self.assertIdentical(log.emitted[&quot;kwargs&quot;][key], value)
+
+
+    def legacy_err(self, log, kwargs, why, exception):
+        #
+        # log.failure() will cause trial to complain, so here we check that
+        # trial saw the correct error and remove it from the list of things to
+        # complain about.
+        #
+        errors = self.flushLoggedErrors(exception.__class__)
+        self.assertEquals(len(errors), 1)
+
+        self.assertIdentical(log.emitted[&quot;level&quot;], LogLevel.error)
+        self.assertEquals(log.emitted[&quot;message&quot;], None)
+        self.assertIdentical(log.emitted[&quot;kwargs&quot;][&quot;failure&quot;].__class__, Failure)
+        self.assertIdentical(log.emitted[&quot;kwargs&quot;][&quot;failure&quot;].value, exception)
+        self.assertIdentical(log.emitted[&quot;kwargs&quot;][&quot;why&quot;], why)
+
+        for key, value in kwargs.items():
+            self.assertIdentical(log.emitted[&quot;kwargs&quot;][key], value)
</ins></span></pre></div>
<a id="CalendarServertrunktwistedcaldavdirectorycalendaruserproxyloaderpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/directory/calendaruserproxyloader.py (11287 => 11288)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/directory/calendaruserproxyloader.py        2013-06-03 20:46:37 UTC (rev 11287)
+++ CalendarServer/trunk/twistedcaldav/directory/calendaruserproxyloader.py        2013-06-03 21:51:40 UTC (rev 11288)
</span><span class="lines">@@ -60,8 +60,9 @@
</span><span class="cx">         try:
</span><span class="cx">             _ignore_tree, proxies_node = readXML(self.xmlFile, ELEMENT_PROXIES)
</span><span class="cx">         except ValueError, e:
</span><del>-            log.error(&quot;XML parse error for '%s' because: %s&quot; % (self.xmlFile, e,), raiseException=RuntimeError)
</del><ins>+            log.failure(&quot;XML parse error for '%s'&quot; % (self.xmlFile,), e)
</ins><span class="cx"> 
</span><ins>+        # FIXME: RuntimeError is dumb.
</ins><span class="cx">         self._parseXML(proxies_node)
</span><span class="cx"> 
</span><span class="cx">     def _parseXML(self, rootnode):
</span><span class="lines">@@ -72,7 +73,7 @@
</span><span class="cx">         for child in rootnode.getchildren():
</span><span class="cx">             
</span><span class="cx">             if child.tag != ELEMENT_RECORD:
</span><del>-                log.error(&quot;Unknown augment type: '%s' in augment file: '%s'&quot; % (child.tag, self.xmlFile,), raiseException=RuntimeError)
</del><ins>+                raise RuntimeError(&quot;Unknown augment type: '%s' in augment file: '%s'&quot; % (child.tag, self.xmlFile,))
</ins><span class="cx"> 
</span><span class="cx">             repeat = int(child.get(ATTRIBUTE_REPEAT, &quot;1&quot;))
</span><span class="cx"> 
</span><span class="lines">@@ -90,11 +91,11 @@
</span><span class="cx">                 ):
</span><span class="cx">                     self._parseMembers(node, write_proxies if node.tag == ELEMENT_PROXIES else read_proxies)
</span><span class="cx">                 else:
</span><del>-                    log.error(&quot;Invalid element '%s' in proxies file: '%s'&quot; % (node.tag, self.xmlFile,), raiseException=RuntimeError)
</del><ins>+                    raise RuntimeError(&quot;Invalid element '%s' in proxies file: '%s'&quot; % (node.tag, self.xmlFile,))
</ins><span class="cx">                     
</span><span class="cx">             # Must have at least a guid
</span><span class="cx">             if not guid:
</span><del>-                log.error(&quot;Invalid record '%s' without a guid in proxies file: '%s'&quot; % (child, self.xmlFile,), raiseException=RuntimeError)
</del><ins>+                raise RuntimeError(&quot;Invalid record '%s' without a guid in proxies file: '%s'&quot; % (child, self.xmlFile,))
</ins><span class="cx">                 
</span><span class="cx">             if repeat &gt; 1:
</span><span class="cx">                 for i in xrange(1, repeat+1):
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavdirectoryxmlaccountsparserpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/directory/xmlaccountsparser.py (11287 => 11288)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/directory/xmlaccountsparser.py        2013-06-03 20:46:37 UTC (rev 11287)
+++ CalendarServer/trunk/twistedcaldav/directory/xmlaccountsparser.py        2013-06-03 21:51:40 UTC (rev 11288)
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx">         try:
</span><span class="cx">             _ignore_tree, accounts_node = readXML(self.xmlFile.path, ELEMENT_ACCOUNTS)
</span><span class="cx">         except ValueError, e:
</span><del>-            log.error(&quot;XML parse error for '%s' because: %s&quot; % (self.xmlFile, e,), raiseException=RuntimeError)
</del><ins>+            raise RuntimeError(&quot;XML parse error for '%s' because: %s&quot; % (self.xmlFile, e,))
</ins><span class="cx">         self._parseXML(accounts_node)
</span><span class="cx"> 
</span><span class="cx">     def _parseXML(self, node):
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavdirectoryxmlaugmentsparserpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/directory/xmlaugmentsparser.py (11287 => 11288)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/directory/xmlaugmentsparser.py        2013-06-03 20:46:37 UTC (rev 11287)
+++ CalendarServer/trunk/twistedcaldav/directory/xmlaugmentsparser.py        2013-06-03 21:51:40 UTC (rev 11288)
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx">         try:
</span><span class="cx">             _ignore_tree, augments_node = readXML(self.xmlFile, ELEMENT_AUGMENTS)
</span><span class="cx">         except ValueError, e:
</span><del>-            log.error(&quot;XML parse error for '%s' because: %s&quot; % (self.xmlFile, e,), raiseException=RuntimeError)
</del><ins>+            raise RuntimeError(&quot;XML parse error for '%s' because: %s&quot; % (self.xmlFile, e,))
</ins><span class="cx"> 
</span><span class="cx">         self._parseXML(augments_node)
</span><span class="cx"> 
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx">         for child in rootnode.getchildren():
</span><span class="cx">             
</span><span class="cx">             if child.tag != ELEMENT_RECORD:
</span><del>-                log.error(&quot;Unknown augment type: '%s' in augment file: '%s'&quot; % (child.tag, self.xmlFile,), raiseException=RuntimeError)
</del><ins>+                raise RuntimeError(&quot;Unknown augment type: '%s' in augment file: '%s'&quot; % (child.tag, self.xmlFile,))
</ins><span class="cx"> 
</span><span class="cx">             repeat = int(child.get(ATTRIBUTE_REPEAT, &quot;1&quot;))
</span><span class="cx"> 
</span><span class="lines">@@ -117,11 +117,11 @@
</span><span class="cx">                 ):
</span><span class="cx">                     fields[node.tag] = node.text == VALUE_TRUE
</span><span class="cx">                 else:
</span><del>-                    log.error(&quot;Invalid element '%s' in augment file: '%s'&quot; % (node.tag, self.xmlFile,), raiseException=RuntimeError)
</del><ins>+                    raise RuntimeError(&quot;Invalid element '%s' in augment file: '%s'&quot; % (node.tag, self.xmlFile,))
</ins><span class="cx">                     
</span><span class="cx">             # Must have at least a uid
</span><span class="cx">             if ELEMENT_UID not in fields:
</span><del>-                log.error(&quot;Invalid record '%s' without a uid in augment file: '%s'&quot; % (child, self.xmlFile,), raiseException=RuntimeError)
</del><ins>+                raise RuntimeError(&quot;Invalid record '%s' without a uid in augment file: '%s'&quot; % (child, self.xmlFile,))
</ins><span class="cx">                 
</span><span class="cx">             if repeat &gt; 1:
</span><span class="cx">                 for i in xrange(1, repeat+1):
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoreschedulingischedulelocalserverspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/localservers.py (11287 => 11288)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/localservers.py        2013-06-03 20:46:37 UTC (rev 11287)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/localservers.py        2013-06-03 21:51:40 UTC (rev 11288)
</span><span class="lines">@@ -267,12 +267,12 @@
</span><span class="cx">         try:
</span><span class="cx">             _ignore_tree, servers_node = readXML(xmlFile, ELEMENT_SERVERS)
</span><span class="cx">         except ValueError, e:
</span><del>-            log.error(&quot;XML parse error for '%s' because: %s&quot; % (xmlFile, e,), raiseException=RuntimeError)
</del><ins>+            raise RuntimeError(&quot;XML parse error for '%s' because: %s&quot; % (xmlFile, e,))
</ins><span class="cx"> 
</span><span class="cx">         for child in servers_node.getchildren():
</span><span class="cx"> 
</span><span class="cx">             if child.tag != ELEMENT_SERVER:
</span><del>-                log.error(&quot;Unknown server type: '%s' in servers file: '%s'&quot; % (child.tag, xmlFile,), raiseException=RuntimeError)
</del><ins>+                raise RuntimeError(&quot;Unknown server type: '%s' in servers file: '%s'&quot; % (child.tag, xmlFile,))
</ins><span class="cx"> 
</span><span class="cx">             server = Server()
</span><span class="cx">             server.isImplicit = child.get(ATTR_IMPLICIT, ATTR_VALUE_YES) == ATTR_VALUE_YES
</span><span class="lines">@@ -289,10 +289,10 @@
</span><span class="cx">                 elif node.tag == ELEMENT_PARTITIONS:
</span><span class="cx">                     ServersParser._parsePartition(xmlFile, node, server)
</span><span class="cx">                 else:
</span><del>-                    log.error(&quot;Invalid element '%s' in servers file: '%s'&quot; % (node.tag, xmlFile,), raiseException=RuntimeError)
</del><ins>+                    raise RuntimeError(&quot;Invalid element '%s' in servers file: '%s'&quot; % (node.tag, xmlFile,))
</ins><span class="cx"> 
</span><span class="cx">             if server.id is None or server.uri is None:
</span><del>-                log.error(&quot;Invalid partition '%s' in servers file: '%s'&quot; % (child.tag, xmlFile,), raiseException=RuntimeError)
</del><ins>+                raise RuntimeError(&quot;Invalid partition '%s' in servers file: '%s'&quot; % (child.tag, xmlFile,))
</ins><span class="cx"> 
</span><span class="cx">             server.check(ignoreIPLookupFailures=ignoreIPLookupFailures)
</span><span class="cx">             results[server.id] = server
</span><span class="lines">@@ -306,7 +306,7 @@
</span><span class="cx">         for child in partitions.getchildren():
</span><span class="cx"> 
</span><span class="cx">             if child.tag != ELEMENT_PARTITION:
</span><del>-                log.error(&quot;Unknown partition type: '%s' in servers file: '%s'&quot; % (child.tag, xmlFile,), raiseException=RuntimeError)
</del><ins>+                raise RuntimeError(&quot;Unknown partition type: '%s' in servers file: '%s'&quot; % (child.tag, xmlFile,))
</ins><span class="cx"> 
</span><span class="cx">             id = None
</span><span class="cx">             uri = None
</span><span class="lines">@@ -316,9 +316,9 @@
</span><span class="cx">                 elif node.tag == ELEMENT_URI:
</span><span class="cx">                     uri = node.text
</span><span class="cx">                 else:
</span><del>-                    log.error(&quot;Invalid element '%s' in augment file: '%s'&quot; % (node.tag, xmlFile,), raiseException=RuntimeError)
</del><ins>+                    raise RuntimeError(&quot;Invalid element '%s' in augment file: '%s'&quot; % (node.tag, xmlFile,))
</ins><span class="cx"> 
</span><span class="cx">             if id is None or uri is None:
</span><del>-                log.error(&quot;Invalid partition '%s' in servers file: '%s'&quot; % (child.tag, xmlFile,), raiseException=RuntimeError)
</del><ins>+                raise RuntimeError(&quot;Invalid partition '%s' in servers file: '%s'&quot; % (child.tag, xmlFile,))
</ins><span class="cx"> 
</span><span class="cx">             server.addPartition(id, uri)
</span></span></pre>
</div>
</div>

</body>
</html>