Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

captureMessage works, while captureException does not. #358

Closed
bfw opened this issue Jul 25, 2015 · 5 comments
Closed

captureMessage works, while captureException does not. #358

bfw opened this issue Jul 25, 2015 · 5 comments

Comments

@bfw
Copy link

bfw commented Jul 25, 2015

When I test error logging from my browser console, using captureMessage works fine, meaning that the message is logged in Sentry:
try { throw new Error('what') } catch (e) { Raven.captureMessage(e.message) }

However, using captureException does not result in an error logged in Sentry:
try { throw new Error('what') } catch (e) { Raven.captureException(e) }

My config only contains the whitelistUrls.

@dcramer
Copy link
Member

dcramer commented Jul 25, 2015

I'm also seeing something that I have to assume is related:

var err = new Error('Own Error'); 
Raven.captureMessage('CaptMessage', {extra: { stackTrace: err.stack }}); 
Raven.captureException(err);

Repro'd on 1.1.19, confirmed its a client issue.

The value sent to the server has the entire object of frames as a string value, thus Sentry discards the stacktrace.

(There are other issues with this as well, such as the Sentry event having "undefined" as the title when clearly it should be able to have a value since err.toString() works just fine)

@dcramer
Copy link
Member

dcramer commented Jul 25, 2015

Semi-unrelated: Raven.install docstring is wrong, and I should not have to Raven.install in order to capture exceptions.

Side note: TraceKit reporting needs removed and we should explicitly call into it with our own window.onerror. This is the fundamental reason for Raven.install() and end-users should not have to care about an API that doesnt make any sense here.

@dcramer
Copy link
Member

dcramer commented Jul 25, 2015

I'm still debugging this, as I was unable to make a test. So far all I know is stackInfo is empty when its parsed.

@dcramer
Copy link
Member

dcramer commented Jul 25, 2015

I've identified the problem and will get a patch up soon

@peterlinnartz
Copy link

@dcramer Thanks for addressing this. Any way we can get a release with this fix?

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

No branches or pull requests

3 participants