Closed micdenny closed 1 year ago
Then another point of the exception took my attention, when I saw DebugProvider
in it, does the DLL be compiled in DEBUG mode? why this?
I've opened a separated issue about this #20
Thank you for pointing that out. Implemented try-catch around that as suggested. Will be available in next release.
This was fixed and is available since v1.29.1. Also latest versions are published in Release mode.
Description
This method can produce an Unhandled Exception that then can cause a crash of the application that uses the SDK.
https://github.com/sportradar/UnifiedOddsSdkNetCore/blob/3885a1147faa8349a90a375896da3d249795928b/src/Sportradar.OddsFeed.SDK/Common/Internal/SdkTimer.cs#L68-L72
This is an exception took from a real environment:
Resolution
Wrap the
OnTick
method body in atry-catch
clause and log the error without throwing it again.If
SdkTimer
is just a pure implementation of a Timer and you don't want to catch the exception there, then you have to look every usages and check that the callback is catching the exception and logging it, like in this method:https://github.com/sportradar/UnifiedOddsSdkNetCore/blob/3885a1147faa8349a90a375896da3d249795928b/src/Sportradar.OddsFeed.SDK/API/Internal/FeedRecoveryManager.cs#L134-L157