void ExecuteCommand(Command command)
{
AbortBackgroudThread();
try {
command.Execute(engine);
} catch(ThreadAbortException) {
} catch(ScriptingException ex) {
interpreter.Error(ex);
} catch(TargetException ex) {
interpreter.Error(ex);
} catch(Exception ex) {
interpreter.Error("Caught exception while executing command {0}: {1}", engine, ex);
}
NotifyStateChange();
}