Open AjaxPop opened 1 month ago
What error didn't get caught?
Although the check on fileDecay ensures the integrity of the data by confirming that it is between 0 (no decay) and 1 (full decay), there remains a potential issue with data corruption or a software bug.
The try-catch block has the benefit of logging any potential errors.
Neat. Seems like it would cut out uncertainties.Sent from my iPhoneOn Mar 28, 2024, at 10:27 PM, Skylar Loomis @.***> wrote: Although the check on fileDecay ensures the integrity of the data by confirming that it is between 0 (no decay) and 1 (full decay), there remains a potential issue with data corruption, modification, or a software bug. The try-catch block ensures that the data integrity adheres to specific expectations regarding its values and structure. Additionally, it has the added benefit of logging out any potential errors.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
Okay. An overall try-catch already is implemented in the calling code:
If you're looking to enrich the logged message (I'd support that), it should be done in that catch block instead.
Use a try-catch block for error handling in the TxConfirmStats::Read function.