Skip to content

Commit 138b93e

Browse files
committed
up
1 parent 687522a commit 138b93e

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

Entity.cs

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,15 @@ public void enterWorld()
201201
{
202202
Dbg.DEBUG_MSG(className + "::enterWorld(" + getDefinedPropterty("uid") + "): " + id);
203203
inWorld = true;
204-
onEnterWorld();
204+
205+
try{
206+
onEnterWorld();
207+
}
208+
catch (Exception e)
209+
{
210+
Dbg.ERROR_MSG(className + "::onEnterWorld: error=" + e.ToString());
211+
}
212+
205213
Event.fireOut("onEnterWorld", new object[]{this});
206214
}
207215

@@ -213,7 +221,15 @@ public void leaveWorld()
213221
{
214222
Dbg.DEBUG_MSG(className + "::leaveWorld: " + id);
215223
inWorld = false;
216-
onLeaveWorld();
224+
225+
try{
226+
onLeaveWorld();
227+
}
228+
catch (Exception e)
229+
{
230+
Dbg.ERROR_MSG(className + "::onLeaveWorld: error=" + e.ToString());
231+
}
232+
217233
Event.fireOut("onLeaveWorld", new object[]{this});
218234
}
219235

@@ -225,7 +241,15 @@ public virtual void enterSpace()
225241
{
226242
Dbg.DEBUG_MSG(className + "::enterSpace(" + getDefinedPropterty("uid") + "): " + id);
227243
inWorld = true;
228-
onEnterSpace();
244+
245+
try{
246+
onEnterSpace();
247+
}
248+
catch (Exception e)
249+
{
250+
Dbg.ERROR_MSG(className + "::onEnterSpace: error=" + e.ToString());
251+
}
252+
229253
Event.fireOut("onEnterSpace", new object[]{this});
230254
}
231255

@@ -237,7 +261,15 @@ public virtual void leaveSpace()
237261
{
238262
Dbg.DEBUG_MSG(className + "::leaveSpace: " + id);
239263
inWorld = false;
240-
onLeaveSpace();
264+
265+
try{
266+
onLeaveSpace();
267+
}
268+
catch (Exception e)
269+
{
270+
Dbg.ERROR_MSG(className + "::onLeaveSpace: error=" + e.ToString());
271+
}
272+
241273
Event.fireOut("onLeaveSpace", new object[]{this});
242274
}
243275

0 commit comments

Comments
 (0)