Skip to content

Commit

Permalink
Backend/Infra: in DEBUG stop crashing for warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
knocte committed Oct 31, 2023
1 parent b72581e commit 8ce8087
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/GWallet.Backend/Infrastructure.fs
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,7 @@ module Infrastructure =
ReportMessage errorMessage ErrorLevel.Error

let private Report (ex: Exception)
#if DEBUG
(_ : ErrorLevel)
#else
(errorLevel: ErrorLevel)
#endif
: bool =

// TODO: log this in a file (log4net?), as well as printing to the console, before sending to sentry
Expand All @@ -128,7 +124,9 @@ module Infrastructure =
Flush ()

#if DEBUG
raise ex
if errorLevel = ErrorLevel.Error then
raise ex
false
#else
let ev = SentryEvent(ex, Level = errorLevel)
ReportInner ev
Expand Down

0 comments on commit 8ce8087

Please sign in to comment.