Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Add Client.SetSkipFrames #76

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

jotto
Copy link

@jotto jotto commented Mar 2, 2016

Add SetSkipFrames so wrapper libraries can optionally hide their lines/frames from the stacktrace

Lukasz Lempart and others added 2 commits March 1, 2016 11:25
**Why**
Using a logging package, the top several frames are useless.
Add ability to skip frames in stack trace.
@mattrobenolt
Copy link
Contributor

Why is this needed on the Client as a whole? Seems bad to assume that any exception will always have the exact same number of frames to skip considering a Client is initialized globally.

This would make more sense imo on a per-Capture thing.

@jotto
Copy link
Author

jotto commented Mar 2, 2016

Why is this needed on the Client as a whole

The use case is specifically for a "wrapper" library. Concretely, a logging/error library with a LogError method that sends errors to both logging and various error reporting services. Thus, when calling myinternallibrary.LogError, which calls Raven.CaptureError, the stack trace (before this PR) includes myinternallibrary

Moving it to the Capture method signature seems more flexible, but harder to architect (how do you put it in any existing method signatures... do we create a new method?)

We used the SetSkipFrames to follow the same style as SetIncludePaths.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants