Instructions Jenkins Doxygen

[fixed] stability issue 49/1149/3
authorVictor Popovici <victorpopovici@gmail.com>
Sat, 23 Nov 2013 09:02:45 +0000 (10:02 +0100)
committerVictor Popovici <victorpopovici@gmail.com>
Sat, 23 Nov 2013 09:10:49 +0000 (10:10 +0100)
Change-Id: Id7f2f8b9617823f8a35d5e560fb717f875430e99

MMOCoreORB/src/server/zone/managers/director/ScreenPlayObserverImplementation.cpp

index 0898644..01e7c4c 100644 (file)
@@ -43,27 +43,35 @@ which carries forward this exception.
 
 #include "server/zone/managers/director/ScreenPlayObserver.h"
 #include "DirectorManager.h"
+#include "engine/lua/LuaPanicException.h"
 
 int ScreenPlayObserverImplementation::notifyObserverEvent(uint32 eventType, Observable* observable, ManagedObject* arg1, int64 arg2) {
-       Lua* lua = DirectorManager::instance()->getLuaInstance();
+       int ret = 1;
 
-       LuaFunction startScreenPlay(lua->getLuaState(), play, key, 1);
-       startScreenPlay << observable;
-       startScreenPlay << arg1;
-       startScreenPlay << arg2;
+       try {
+               Lua* lua = DirectorManager::instance()->getLuaInstance();
 
-       startScreenPlay.callFunction();
+               LuaFunction startScreenPlay(lua->getLuaState(), play, key, 1);
+               startScreenPlay << observable;
+               startScreenPlay << arg1;
+               startScreenPlay << arg2;
 
-       if (lua_gettop(lua->getLuaState()) == 0) {
-               Logger::console.error("ScreenPlayObserverImplementation::notifyObserverEvent didnt return a value from " + play + ":" + key);
+               startScreenPlay.callFunction();
 
-               assert(0 && "no return value in  ScreenPlayObserverImplementation::notifyObserverEvent");
+               if (lua_gettop(lua->getLuaState()) == 0) {
+                       Logger::console.error("ScreenPlayObserverImplementation::notifyObserverEvent didnt return a value from " + play + ":" + key);
 
-               return 1;
-       }
+                       assert(0 && "no return value in  ScreenPlayObserverImplementation::notifyObserverEvent");
+
+                       return 1;
+               }
 
 
-       int ret = lua->getIntParameter(lua->getLuaState());
+               ret = lua->getIntParameter(lua->getLuaState());
+
+       } catch (LuaPanicException& panic) {
+               Logger::console.error("Panic exception: " + panic.getMessage() + " while trying to run SceenPlayObserver: " + play + ":" + key);
+       }
 
        //1 remove observer, 0 keep observer