Skip to content

Commit

Permalink
xrGame: Use standard try-catch blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Zegeri authored and q4a committed Sep 27, 2018
1 parent 13b0766 commit cc46ec3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/xrGame/physics_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ static void play_object(dxGeomUserData* data, SGameMtlPair* mtl_pair, const dCon

CPHSoundPlayer* sp = NULL;
#ifdef DEBUG
__try
try
{
sp = data->ph_ref_object->ObjectPhSoundPlayer();
}
__except (EXCEPTION_EXECUTE_HANDLER)
catch (...)
{
Msg("data->ph_ref_object: %p ", data->ph_ref_object);
Msg("data: %p ", data);
Expand Down
5 changes: 3 additions & 2 deletions src/xrGame/script_game_object_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
IC CGameObject& CScriptGameObject::object() const
{
#ifdef DEBUG
__try
// What does this even throw? Think about rewriting this try-catch block
try
{
if (m_game_object && m_game_object->lua_game_object() == this)
return (*m_game_object);
}
__except (EXCEPTION_EXECUTE_HANDLER)
catch (...)
{
}

Expand Down

0 comments on commit cc46ec3

Please sign in to comment.