Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

### Features
- DebugStackTrace no longer creates a stack trace for dynamic methods, which should result in slightly better performance when capturing errors ([#4954](https://github.com/getsentry/sentry-dotnet/pull/4954))

### Fixes

- The SDK now logs a `Warning` instead of an `Error` when being ratelimited ([#4927](https://github.com/getsentry/sentry-dotnet/pull/4927))
Expand Down
14 changes: 9 additions & 5 deletions src/Sentry/Internal/DebugStackTrace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -532,14 +532,18 @@ private static void DemangleLambdaReturnType(SentryStackFrame frame)
return reader.Invoke(assemblyName);
}

var assembly = options.FileSystem.OpenFileForReading(assemblyName);
return new PEReader(assembly);
if (options.FileSystem.FileExists(assemblyName))
{
var assembly = options.FileSystem.OpenFileForReading(assemblyName);
return new PEReader(assembly);
}
}
catch (Exception)
catch
{
assemblyName = null;
return null;
// Swallow and return null below
}
assemblyName = null;
return null;
}

private int? AddManagedModuleDebugImage(Module module)
Expand Down
Loading