<br><br><div><span class="gmail_quote">On 7/23/07, <b class="gmail_sendername">Alan Gauld</b> <<a href="mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>"Tino Dai" <<a href="mailto:tinoloc@gmail.com">tinoloc@gmail.com</a>> wrote<br><br>> Sorry about that. I think that a simpler question would be:<br><br>I'm not sure what the better question is, but I think I
<br>answered it :-)<br><br>> In my driver code:<br>><br>> ap = apacheModule.apacheModule(configXML)<br>> while 1:<br>> try:<br>> rVs=ap.perf()<br>> for anObj in self.objList:
<br>> getattr(anObj,"do")(rVs)<br>> time.sleep(1)<br>> except ArraryOutOfBoundsException:<br>> pass<br>> except Exception, e:<br>> sys.stdout.write
(str(e) + "\n")<br>> sys.exit(1)<br>><br>><br>> And in my apacheModule class:<br>><br>> try:<br>><br>> (totalAccess,totalTraffic)=(rVs[3][1],self.sizeConvert ...<br>> except Exception,e:
<br>> datetime.datetime.now()<br>> sys.stdout.write(str(e) + "\n")<br>> sys.stdout.write(rVs)<br>><br>> If the apacheModule raises an ArrayOutOfBound exception (don't
<br>> remember if that the real exception name), the exception will bubble<br>> up, and<br>> the apacheDriver try-except will catch it, right?<br><br>No, if you catch it here, as you will if you catch all Exceptions,
<br>then<br>it will stop right there unless you explicitly raise it. You bneed to<br>add a<br>raise statement after the stdout.write stuff.<br><br>Alan G.</blockquote><div><br>Thanks Alan,<br><br> That makes a lot of sense. I will be see what I can do tomorrow with a revision of the code.
<br><br>Thanks again,<br>Tino<br><br></div><br></div>