Hey all,

I am currently embedding IronPython in a C# app of mine. I need to
execute external script files, but to also be able to only executes
the ones that will be error free. Here is an example script:

a = "This is a test"
print undefinedVariable
b = "This is another test"

If I execute this script, it will halt on line 1 and thus only
executing half of it. This can be extremely confusing since declaring
the variable "a" will have worked, but not "b". I am using
PythonEngine.CreateScriptSourceFromFile.

Is there any way to check if a script contains errors before executing
it, or at the very least reverting the changes it made?

Thanks.
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to