* Executes the script.
*/
public void run() {
m_Stopped = false;
getOwner().notifyScriptFinishedListeners(new ScriptExecutionEvent(m_Owner, Type.STARTED));
try {
doRun();
if (!m_Stopped)
getOwner().notifyScriptFinishedListeners(new ScriptExecutionEvent(m_Owner, Type.FINISHED));
}
catch (Exception e) {
e.printStackTrace();
getOwner().notifyScriptFinishedListeners(new ScriptExecutionEvent(m_Owner, Type.ERROR, e));
}
getOwner().m_ScriptThread = null;
}