Skip to content

Commit

Permalink
fix installation id catches dir not exist (#1159)
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-garcia authored Aug 17, 2021
1 parent fb2372a commit 45f95bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 1 addition & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

### Fixes

### Features

### Fixes

- Installation id catches dir not exist([#1159](https://github.com/getsentry/sentry-dotnet/pull/1159))
- Set error status to transaction if http has exception and ok status ([#1143](https://github.com/getsentry/sentry-dotnet/pull/1143))
- Fix max breadcrumbs limit when MaxBreadcrumbs is zero or lower ([#1145](https://github.com/getsentry/sentry-dotnet/pull/1145))

Expand Down
8 changes: 8 additions & 0 deletions src/Sentry/GlobalSessionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ public GlobalSessionManager(
filePath
);
}
catch (DirectoryNotFoundException)
{
// on PS4 we're seeing CreateDirectory work but ReadAllText throw DirectoryNotFoundException
_options.DiagnosticLogger?.LogDebug(
"Directory containing installation ID does not exist ({0}).",
filePath
);
}

// Generate new installation ID and store it in a file
var id = Guid.NewGuid().ToString();
Expand Down

0 comments on commit 45f95bb

Please sign in to comment.