[Zope] try tag doesn't seem to work.

Jay, Dylan djay@lucent.com
Thu, 20 Jan 2000 11:02:30 +1100


I am not having much success trying to catch an exception from ZClient.

From the following code

<ol>
<dtml-in locs>
 <li>&dtml-loc_name; 
  <try>
   <dtml-var "WebClient(loc)">
   <dtml-if "WebClient(loc)">
    (ok)
   </dtml-if>
  <except>
    (failed)
  </try>
 </li>
</dtml-in>
</ol>


I get the following error





 Error type:  bci.NotAvailable
 Error value: (10060, 'winsock error') (File:
http://135.9.1.4/cgi-bin/provsn/DenverGetFile.py Line: [])
None None for None




<!--
Traceback (innermost last):
  File C:\PROGRA~1\PROVIS~2\lib\python\ZPublisher\Publish.py, line 214, in
publish_module
  File C:\PROGRA~1\PROVIS~2\lib\python\ZPublisher\Publish.py, line 179, in
publish
  File C:\PROGRA~1\PROVIS~2\lib\python\Zope\__init__.py, line 202, in
zpublisher_exception_hook
    (Object: ElementWithAttributes)
  File C:\PROGRA~1\PROVIS~2\lib\python\ZPublisher\Publish.py, line 165, in
publish
  File C:\PROGRA~1\PROVIS~2\lib\python\ZPublisher\mapply.py, line 160, in
mapply
    (Object: testLocations)
  File C:\PROGRA~1\PROVIS~2\lib\python\ZPublisher\Publish.py, line 102, in
call_object
    (Object: testLocations)
  File C:\PROGRA~1\PROVIS~2\lib\python\OFS\DTMLMethod.py, line 145, in
__call__
    (Object: testLocations)
  File C:\PROGRA~1\PROVIS~2\lib\python\DocumentTemplate\DT_String.py, line
502, in __call__
    (Object: testLocations)
  File C:\PROGRA~1\PROVIS~2\lib\python\DocumentTemplate\DT_In.py, line 691,
in renderwob
    (Object: locs)
  File C:\PROGRA~1\PROVIS~2\lib\python\DocumentTemplate\DT_Util.py, line
335, in eval
    (Object: WebClient(loc))
    (Info: loc)
  File &lt;string&gt;, line 0, in ?
  File
C:\PROGRA~1\PROVIS~2\lib\python\Products\ExternalMethod\ExternalMethod.py,
line 248, in __call__
    (Object: WebClient)
    (Info: (('http://135.9.1.4/cgi-bin/provsn/DenverGetFile.py',), {},
('http://www.yahoo.com/', None, None)))
  File C:\PROGRA~1\PROVIS~2\Extensions\WebClient.py, line 8, in web_client
  File C:\PROGRA~1\PROVIS~2\lib\python\ZPublisher\Client.py, line 344, in
call
  File C:\PROGRA~1\PROVIS~2\lib\python\ZPublisher\Client.py, line 221, in
__call__
    (Object: DenverGetFile.py)
bci.NotAvailable: (see above)