GoogleCloudPlatform / stackdriver-errors-js

Client-side JavaScript exception reporting library for Cloud Error Reporting
https://cloud.google.com/error-reporting/
Apache License 2.0
362 stars 54 forks source link

Fix stack trace if there are anonymous functions in stack trace #24

Closed Jastrzebowski closed 7 years ago

Jastrzebowski commented 7 years ago

Problem with issue #21 is due to errors thrown in anonymous scope, V8 stack trace format expects <anonymous> in this case. I've added a simple fallback for this case and some tests to try it (I'm not 100% happy with anonymous one but I have no idea how to throw an error in the global anonymous scope from inside the tests). Still, I think we should review the whole V8 format and check if we cover every case and definitely write tests to cover all the cases.

As for other changes, I've added scripts commands in package.json so no global Gulp required anymore — Readme updated too.

steren commented 7 years ago

Thanks a lot, I will take a closer look within a day.

steren commented 7 years ago

Due to the fact that the sent stacktraces might contain more frames (with ), which might impact the error grouping algorithm, when this change is merged, I will increment the major version of the library.