Skip to content

Commit cc46ec3

Browse files
Zegeriq4a
authored andcommitted
xrGame: Use standard try-catch blocks
1 parent 13b0766 commit cc46ec3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/xrGame/physics_game.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ static void play_object(dxGeomUserData* data, SGameMtlPair* mtl_pair, const dCon
156156

157157
CPHSoundPlayer* sp = NULL;
158158
#ifdef DEBUG
159-
__try
159+
try
160160
{
161161
sp = data->ph_ref_object->ObjectPhSoundPlayer();
162162
}
163-
__except (EXCEPTION_EXECUTE_HANDLER)
163+
catch (...)
164164
{
165165
Msg("data->ph_ref_object: %p ", data->ph_ref_object);
166166
Msg("data: %p ", data);

src/xrGame/script_game_object_impl.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@
1515
IC CGameObject& CScriptGameObject::object() const
1616
{
1717
#ifdef DEBUG
18-
__try
18+
// What does this even throw? Think about rewriting this try-catch block
19+
try
1920
{
2021
if (m_game_object && m_game_object->lua_game_object() == this)
2122
return (*m_game_object);
2223
}
23-
__except (EXCEPTION_EXECUTE_HANDLER)
24+
catch (...)
2425
{
2526
}
2627

0 commit comments

Comments
 (0)