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 3865f6a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 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,8 @@ module Infrastructure =
Flush ()

#if DEBUG
raise ex
if errorLevel = ErrorLevel.Error then

Check failure on line 127 in src/GWallet.Backend/Infrastructure.fs

View workflow job for this annotation

GitHub Actions / macOS--dotnet6-and-mono

This expression was expected to have type� 'unit' �but here has type� 'bool'

Check failure on line 127 in src/GWallet.Backend/Infrastructure.fs

View workflow job for this annotation

GitHub Actions / macOS--dotnet6-and-mono

This expression was expected to have type� 'unit' �but here has type� 'bool'

Check failure on line 127 in src/GWallet.Backend/Infrastructure.fs

View workflow job for this annotation

GitHub Actions / windows--dotnet6-and-legacyFramework

This expression was expected to have type� 'unit' �but here has type� 'bool'

Check failure on line 127 in src/GWallet.Backend/Infrastructure.fs

View workflow job for this annotation

GitHub Actions / windows--dotnet6-and-legacyFramework

This expression was expected to have type� 'unit' �but here has type� 'bool'

Check failure on line 127 in src/GWallet.Backend/Infrastructure.fs

View workflow job for this annotation

GitHub Actions / windows--dotnet6-only

This expression was expected to have type� 'unit' �but here has type� 'bool'

Check failure on line 127 in src/GWallet.Backend/Infrastructure.fs

View workflow job for this annotation

GitHub Actions / windows--dotnet6-only

This expression was expected to have type� 'unit' �but here has type� 'bool'
raise ex
#else
let ev = SentryEvent(ex, Level = errorLevel)
ReportInner ev
Expand Down

0 comments on commit 3865f6a

Please sign in to comment.