-
Notifications
You must be signed in to change notification settings - Fork 68
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
backtrace: add support for generic backtraces #4
Conversation
d7d5dd0
to
db57cdd
Compare
Sometimes exceptions can contain manual backtraces that quack similar to Ruby exceptions, but do not stricly adhere their template. I stumbled upon this issues, when I was working with SCSS. It sets a couple of custom first frames such as: ``` Sass::SyntaxError: Undefined mixin 'animation'. /home/app/assets/stylesheets/error_pages.scss:139:in `animation' /home/app/app/assets/stylesheets/error_pages.scss:139 ``` Previously, we were not able to parse the second frame. Furthermore, we now raise error if we cannot parse a stack frame to simplify debugguging and improving our parser.
b937533
to
d778d92
Compare
return match if match | ||
|
||
unless (matched_frame = GENERIC_STACKFRAME_REGEXP.match(stackframe)) | ||
raise Airbrake::Error, "failed parsing '#{stackframe}'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: "Failed parsing" assumes that there was some failure, but here we just "can't parse".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed by b31d680
I don't understand who is responsible to parse |
According to: * #4 (comment) * #4 (comment)
Its backtrace:
|
LGTM |
backtrace: add support for generic backtraces
Sometimes exceptions can contain manual backtraces that quack similar to
Ruby exceptions, but do not stricly adhere their template. I stumbled
upon this issues, when I was working with SCSS. It sets a couple of
custom first frames such as:
Previously, we were not able to parse the second frame.
Furthermore, we now raise error if we cannot parse a stack frame to
simplify debugguging and improving our parser.