Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-garcia committed Jul 13, 2021
1 parent c7ed62b commit 3415b47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

- ASP.NET Core: fix handled not being set for Handled exceptions ([#1111](https://github.com/getsentry/sentry-dotnet/pull/1111))

### Changed
### Features

- File system persistence for sessions ([#1105](https://github.com/getsentry/sentry-dotnet/pull/1105))

Expand Down
7 changes: 4 additions & 3 deletions src/Sentry/GlobalSessionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ private void DeletePersistedSession()
return;
}

var filePath = Path.Combine(_persistenceDirectoryPath, PersistedSessionFileName);
try
{
var filePath = Path.Combine(_persistenceDirectoryPath, PersistedSessionFileName);

// Try to log the contents of the session file before we delete it
if (_options.DiagnosticLogger?.IsEnabled(SentryLevel.Debug) ?? false)
Expand Down Expand Up @@ -271,8 +271,9 @@ private void DeletePersistedSession()
catch (Exception ex)
{
_options.DiagnosticLogger?.LogError(
"Failed to delete persisted session from the file system.",
ex
"Failed to delete persisted session from the file system: '{0}'",
ex,
filePath
);
}
}
Expand Down

0 comments on commit 3415b47

Please sign in to comment.