[Ironpython-users] ErrorListener

Markus Schaber m.schaber at 3s-software.com
Wed Oct 12 15:50:19 CEST 2011


Hi, Jimmy,

Von: Jimmy Schementi [mailto:jschementi at gmail.com]

> >> 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().

It's not about the errors, but about the warnings. We run IronPython embedded (hosted) in our application, and want to capture the warnings to display them in a different window.

Best regards

Markus Schaber
-- 
___________________________
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax +49-831-54031-50

Email: m.schaber at 3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects: http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 



More information about the Ironpython-users mailing list