Hello ,
When an exeption occurs in a IronPython executet script, and I print the
sys.exc , i get something ugly like the example below.
How can I get the fileName and line number?
Thx in advance
Troels
26-06-2007 13:19:04 : IronPython.Runt ime.Exceptions. PythonIndentati onError:
unexpected token def
ved IronPython.Comp iler.SimplePars erSink.AddError (String path, String
message, String lineText, CodeSpan span, Int32 errorCode, Severity severity)
ved IronPython.Comp iler.CompilerCo ntext.AddError( String message, String
lineText, Int32 startLine, Int32 startColumn, Int32 endLine, Int32
endColumn, Int32 errorCode, Severity severity)
ved IronPython.Comp iler.Parser.Rep ortSyntaxError( Location start, Location
end, String message, Int32 errorCode)
ved IronPython.Comp iler.Parser.Rep ortSyntaxError( Token t, Int32
errorCode, Boolean allowIncomplete )
ved IronPython.Comp iler.Parser.Par seSuite()
ved IronPython.Comp iler.Parser.Par seFuncDef()
ved IronPython.Comp iler.Parser.Par seStmt()
ved IronPython.Comp iler.Parser.Par seSuite()
ved IronPython.Comp iler.Parser.Par seClassDef()
ved IronPython.Comp iler.Parser.Par seStmt()
ved IronPython.Comp iler.Parser.Par seFileInput()
ved IronPython.Host ing.PythonEngin e.Compile(Parse r p, Boolean
debuggingPossib le)
ved IronPython.Host ing.PythonEngin e.CompileFile(S tring fileName)
ved IronPython.Host ing.PythonEngin e.ExecuteFile(S tring fileName)
Comment