Skip to content

Commit e3afaa3

Browse files
committed
Add more exception logging
1 parent 1b6177c commit e3afaa3

3 files changed

Lines changed: 41 additions & 29 deletions

File tree

PSMSVirtualDeviceManager/UCVirtualControllers/UCAttachments/UCControllerAttachments.vb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ Public Class UCControllerAttachments
139139

140140
g_bInit = True
141141

142-
AutostartLoad()
142+
Try
143+
AutostartLoad()
144+
Catch ex As Exception
145+
ClassAdvancedExceptionLogging.WriteToLogMessageBox(ex)
146+
End Try
143147
End Sub
144148

145149
Private Sub AutostartLoad()

PSMSVirtualDeviceManager/UCVirtualControllers/UCAttachments/UCControllerAttachmentsItem.vb

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,23 +142,27 @@ Public Class UCControllerAttachmentsItem
142142
End Sub
143143

144144
Private Sub ComboBox_ControllerID_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox_ControllerID.SelectedIndexChanged
145-
SetTrackerNameText()
145+
Try
146+
SetTrackerNameText()
146147

147-
If (g_bIgnoreEvents) Then
148-
Return
149-
End If
148+
If (g_bIgnoreEvents) Then
149+
Return
150+
End If
150151

151-
Try
152-
g_bIgnoreUnsaved = True
153-
g_mClassConfig.LoadConfig()
154-
Finally
155-
g_bIgnoreUnsaved = False
156-
End Try
152+
Try
153+
g_bIgnoreUnsaved = True
154+
g_mClassConfig.LoadConfig()
155+
Finally
156+
g_bIgnoreUnsaved = False
157+
End Try
157158

158-
g_mClassIO.m_Index = CInt(ComboBox_ControllerID.SelectedItem)
159-
g_mClassIO.Enable()
159+
g_mClassIO.m_Index = CInt(ComboBox_ControllerID.SelectedItem)
160+
g_mClassIO.Enable()
160161

161-
SetUnsavedState(False)
162+
SetUnsavedState(False)
163+
Catch ex As Exception
164+
ClassAdvancedExceptionLogging.WriteToLogMessageBox(ex)
165+
End Try
162166
End Sub
163167

164168
Private Sub ComboBox_ParentControllerID_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox_ParentControllerID.SelectedIndexChanged

PSMSVirtualDeviceManager/UCVirtualMotionTracker/UCVirtualMotionTrackerItem.vb

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -399,26 +399,30 @@ Public Class UCVirtualMotionTrackerItem
399399
End Sub
400400

401401
Private Sub ComboBox_ControllerID_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox_DeviceID.SelectedIndexChanged
402-
UpdateTrackerTitle()
402+
Try
403+
UpdateTrackerTitle()
403404

404-
If (g_bIgnoreEvents) Then
405-
Return
406-
End If
405+
If (g_bIgnoreEvents) Then
406+
Return
407+
End If
407408

408-
Try
409-
g_bIgnoreUnsaved = True
410-
g_mClassConfig.LoadConfig()
411-
Finally
412-
g_bIgnoreUnsaved = False
413-
End Try
409+
Try
410+
g_bIgnoreUnsaved = True
411+
g_mClassConfig.LoadConfig()
412+
Finally
413+
g_bIgnoreUnsaved = False
414+
End Try
414415

415-
g_mClassIO.m_Index = CInt(ComboBox_DeviceID.SelectedItem)
416-
g_mClassIO.Enable()
416+
g_mClassIO.m_Index = CInt(ComboBox_DeviceID.SelectedItem)
417+
g_mClassIO.Enable()
417418

418-
UpdateTrackerRoleComboBox()
419-
g_UCVirtualMotionTracker.g_mFormMain.PromptRestartSteamVR()
419+
UpdateTrackerRoleComboBox()
420+
g_UCVirtualMotionTracker.g_mFormMain.PromptRestartSteamVR()
420421

421-
SetUnsavedState(False)
422+
SetUnsavedState(False)
423+
Catch ex As Exception
424+
ClassAdvancedExceptionLogging.WriteToLogMessageBox(ex)
425+
End Try
422426
End Sub
423427

424428
Private Sub ComboBox_VMTTrackerID_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox_VMTTrackerID.SelectedIndexChanged

0 commit comments

Comments
 (0)