From: SourceForge.net <no...@so...> - 2007-04-12 21:27:21
|
Bugs item #1699556, was opened at 2007-04-12 16:27 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1699556&group_id=12867 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Core Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: ben (pragmar) Assigned to: Nobody/Anonymous (nobody) Summary: problem with Exception? Initial Comment: I was attempting to trap a parsing error and a fatal error somehow leaked through. Unsure what this means, but I figured best to post it. Thanks. import xml.dom.minidom as md # error not trapped in jython 2.2b1 try: xml = md.parseString('<malformed att=8>0</malformed>') except Exception, e: print str(e) # Traceback (innermost last): # File "<console>", line 2, in ? # File "C:\jython2.2b1\Lib\xml\dom\minidom.py", line 1933, in parseString # File "C:\jython2.2b1\Lib\xml\dom\minidom.py", line 1908, in _do_pulldom_parse # File "C:\jython2.2b1\Lib\xml\dom\pulldom.py", line 275, in _slurp # File "C:\jython2.2b1\Lib\xml\sax\drivers2\drv_javasax.py", line 141, in parse # File "C:\jython2.2b1\Lib\xml\sax\drivers2\drv_javasax.py", line 58, in fatalError # File "C:\jython2.2b1\Lib\xml\sax\handler.py", line 38, in fatalError # SAXParseException: <unknown>:1:16: Open quote is expected for attribute "att" associated with an element type "malformed". # w/o "Exception", jython 2.2b1 behaves. try: xml = md.parseString('<malformed att=8>0</malformed>') except: pass #>>> ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1699556&group_id=12867 |