[Ironpython-users] ErrorListener

Jimmy Schementi jschementi at gmail.com
Wed Oct 12 15:22:58 CEST 2011

On Oct 12, 2011, at 4:55 AM, Markus Schaber wrote:

>> Sorry for disturbing again, but I'm a little bit confused about the
>> ErrorListeners from the Hosting API.
>> For compilation of a ScriptSource, I can pass an ErrorListener which gets
>> the errors and warnings, but it seems that I cannot pass an ErrorListener
>> for the execution of the ScriptSource.
>> My guess is that the ErrorListener passed to the compilation is referenced
>> from the compiled ScriptSource. Can you confirm hat? Or did I miss
>> something?
> This guess seems wrong - it seems that the warnings are simply spit out on stderr by default.

ErrorListener is only used for compiler errors; if you want to capture runtime errors you can put a try/catch around the call to ScriptSource.Execute().


More information about the Ironpython-users mailing list