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.Runtime.Exceptions.PythonIndentationError: unexpected token def ved IronPython.Compiler.SimpleParserSink.AddError(String path, String message, String lineText, CodeSpan span, Int32 errorCode, Severity severity) ved IronPython.Compiler.CompilerContext.AddError(String message, String lineText, Int32 startLine, Int32 startColumn, Int32 endLine, Int32 endColumn, Int32 errorCode, Severity severity) ved IronPython.Compiler.Parser.ReportSyntaxError(Location start, Location end, String message, Int32 errorCode) ved IronPython.Compiler.Parser.ReportSyntaxError(Token t, Int32 errorCode, Boolean allowIncomplete) ved IronPython.Compiler.Parser.ParseSuite() ved IronPython.Compiler.Parser.ParseFuncDef() ved IronPython.Compiler.Parser.ParseStmt() ved IronPython.Compiler.Parser.ParseSuite() ved IronPython.Compiler.Parser.ParseClassDef() ved IronPython.Compiler.Parser.ParseStmt() ved IronPython.Compiler.Parser.ParseFileInput() ved IronPython.Hosting.PythonEngine.Compile(Parser p, Boolean debuggingPossible) ved IronPython.Hosting.PythonEngine.CompileFile(String fileName) ved IronPython.Hosting.PythonEngine.ExecuteFile(String fileName) -- http://mail.python.org/mailman/listinfo/python-list