Skip to content

check for both stacktraces before calling 'isSameStacktrace' #1150

New issue

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

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

Already on GitHub? # to your account

Merged

Conversation

zivl
Copy link
Contributor

@zivl zivl commented Nov 27, 2017

resolve issue #1125

  1. added function in utils.js to check if both given objects are undefined. This function will be called from isSameException for the Exception interface where stacktrace might be missing.

    *Note: I've assumed that in such case, where we don't have stacktrace to check, we should return false so Raven will report the exception (even in the price of having duplicates)
  2. added test case to simulate the situation

Further more, after investigating issue #1125, I've found the in the function _processException, where the stacktrace object is being built, there is

    var stacktrace;
    if(frames && frames.length){
        stacktrace = {...}
    } 
    else if(fileurl){
        stacktrace = {...}
    }

but no final else, which means that in this case stacktrace resolves to undefined.

I can do some change there, but I don't know what is your exact policy regading such case. So for now I did this extra check, but in my opinion, a proper handling the stacktrace object is better.

@zivl
Copy link
Contributor Author

zivl commented Dec 4, 2017

@kamilogorek FYI

@kamilogorek kamilogorek merged commit 0362926 into getsentry:master Dec 4, 2017
@kamilogorek
Copy link
Contributor

It makes sense now. I missed isSameException part. Thanks!

@zivl
Copy link
Contributor Author

zivl commented Dec 13, 2017

@kamilogorek any expectation when is it going to be released?

@kamilogorek
Copy link
Contributor

kamilogorek commented Dec 13, 2017

@zivl I'll release a new version once #1162 gets merged. Hopefully today :)

@kamilogorek
Copy link
Contributor

Released in 3.21.0

Jei added a commit to trimethyl/trimethyl that referenced this pull request Aug 5, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants