Skip to content

Conversation

@brizental
Copy link
Contributor

@brizental brizental commented Oct 6, 2021

Pull Request checklist

  • Quality: Make sure this PR builds and runs cleanly.
    • Inside the glean/ folder, run:
      • npm run test Runs all tests
      • npm run lint Runs all linters
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry to CHANGELOG.md or an explanation of why it does not need one
  • Documentation: This PR includes documentation changes, an explanation of why it does not need that or a follow-up bug has been filed to do that work
    • Docstrings were updates and I think that is enough docs on this one.

It makes things easier to debug.
+ Some clean up work on the Dispatcher.execute() method.
That switch statement was _confusing_.
The log command was only accepting strings, which was not ideal because
it made it hard to log errors and stack traces and also console.*
function accept anything so our log command should do the same anyways.

In this commit I also audit all the other places we logged errors
outside of the dispatcher in order to make sure we are now logging
useful stack traces along with error messages.
@auto-assign auto-assign bot requested a review from badboy October 6, 2021 14:13
@brizental brizental changed the title Bug 1732294 - If initialization erros Glean doesn't do anything else Bug 1732294 - If initialization errors Glean doesn't do anything else Oct 6, 2021
Co-authored-by: Jan-Erik Rediger <badboy@archlinux.us>
@brizental brizental merged commit 9a5dc95 into mozilla:main Oct 11, 2021
@brizental brizental deleted the 1732294-init-fail branch October 11, 2021 11:00
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

Successfully merging this pull request may close these issues.

2 participants