@@ -218,6 +218,7 @@ private void OnLogWriteError(string eventType, Exception ex)
218218
219219 private void WriteBroadcastError ( string context , Exception ex )
220220 {
221+ if ( ex != null ) SentrySdk . CaptureException ( ex ) ;
221222 if ( string . IsNullOrEmpty ( _pluginDataPath ) ) return ;
222223 var path = Path . Combine ( _pluginDataPath , "broadcast-errors.log" ) ;
223224 var line = DateTime . UtcNow . ToString ( "o" ) + " " + context + ( ex != null ? " " + ex . Message : "" ) + Environment . NewLine ;
@@ -659,6 +660,7 @@ private System.Collections.Generic.Dictionary<string, object> BuildCaptureIncide
659660 }
660661 catch ( Exception ex )
661662 {
663+ SentrySdk . CaptureException ( ex ) ;
662664 var err = ex . Message ?? "replay_session_failed" ;
663665 LogActionResult ( action , arg , correlationId , false , err ) ;
664666 return ( false , null , err ) ;
@@ -712,6 +714,7 @@ private System.Collections.Generic.Dictionary<string, object> BuildCaptureIncide
712714 }
713715 catch ( Exception ex )
714716 {
717+ SentrySdk . CaptureException ( ex ) ;
715718 var err = ex . Message ?? "replay_speed_failed" ;
716719 LogActionResult ( action , arg , correlationId , false , err ) ;
717720 return ( false , null , err ) ;
@@ -746,6 +749,7 @@ private System.Collections.Generic.Dictionary<string, object> BuildCaptureIncide
746749 }
747750 catch ( Exception ex )
748751 {
752+ SentrySdk . CaptureException ( ex ) ;
749753 var err = ex . Message ?? "replay_seek_failed" ;
750754 LogActionResult ( action , arg , correlationId , false , err ) ;
751755 return ( false , null , err ) ;
@@ -780,6 +784,7 @@ private System.Collections.Generic.Dictionary<string, object> BuildCaptureIncide
780784 }
781785 catch ( Exception ex )
782786 {
787+ SentrySdk . CaptureException ( ex ) ;
783788 var err = ex . Message ?? "replay_jump_failed" ;
784789 LogActionResult ( action , arg , correlationId , false , err ) ;
785790 return ( false , null , err ) ;
@@ -810,6 +815,7 @@ private System.Collections.Generic.Dictionary<string, object> BuildCaptureIncide
810815 }
811816 catch ( Exception ex )
812817 {
818+ SentrySdk . CaptureException ( ex ) ;
813819 var err = ex . Message ?? "seek_to_incident_failed" ;
814820 LogActionResult ( action , arg , correlationId , false , err ) ;
815821 return ( false , null , err ) ;
@@ -843,6 +849,7 @@ private System.Collections.Generic.Dictionary<string, object> BuildCaptureIncide
843849 }
844850 catch ( Exception ex )
845851 {
852+ SentrySdk . CaptureException ( ex ) ;
846853 LogActionResult ( action , arg , correlationId , false , ex . Message ) ;
847854 return ( false , null , ex . Message ) ;
848855 }
@@ -889,6 +896,7 @@ private System.Collections.Generic.Dictionary<string, object> BuildCaptureIncide
889896 catch ( Exception ex )
890897 {
891898 sw . Stop ( ) ;
899+ SentrySdk . CaptureException ( ex ) ;
892900 LogActionResult ( action , arg , correlationId , false , ex . Message , BuildCaptureIncidentSupplement ( parsed , sw . ElapsedMilliseconds ) ) ;
893901 return ( false , null , ex . Message ) ;
894902 }
@@ -1070,6 +1078,7 @@ private void RefreshDependencyChecks()
10701078 }
10711079 catch ( Exception ex )
10721080 {
1081+ SentrySdk . CaptureException ( ex ) ;
10731082 _dashboardPingStatus = "Error: " + ex . Message ;
10741083 // #region agent log
10751084 WriteAgentHttpDebug ( "H1,H3,H5" , "dashboard_ping_error" , new Dictionary < string , object >
@@ -1491,6 +1500,7 @@ public void End(PluginManager pluginManager)
14911500 }
14921501 catch ( Exception ex )
14931502 {
1503+ SentrySdk . CaptureException ( ex ) ;
14941504 _logger ? . Warn ( $ "iRacing SDK Stop failed: { ex . Message } ") ;
14951505 }
14961506 _irsdk = null ;
0 commit comments