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

Tweaks to error reporting in Tracker. #3822

Closed
wants to merge 5 commits into from
Closed

Tweaks to error reporting in Tracker. #3822

wants to merge 5 commits into from

Conversation

Slava
Copy link
Contributor

@Slava Slava commented Feb 26, 2015

Attempts to fix #3655

@stubailo
Copy link
Contributor

The onError callback doesn't actually help fix #3822, does it? Or would it help because you can throw the error yourself?

@Slava
Copy link
Contributor Author

Slava commented Feb 26, 2015

The logging part does help. onError extends the API to make it more flexible and up to the user to handle errors. (errors printed to console are not easy to handle fwiw).

It just occurred to me, this change might "break" some tests as the code doesn't use Meteor._debug anymore.

* @returns {Tracker.Computation}
*/
Tracker.autorun = function (f) {
Tracker.autorun = function (f, onError) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since most users of Tracker.autorun (a very user-visible API) won't use this optional feature, it should probably be a named option?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do!

@stubailo
Copy link
Contributor

@Slava ping!

@Slava
Copy link
Contributor Author

Slava commented Mar 17, 2015

@stubailo @glasser updated the PR. Added a test and made sure that the Meteor._supress_log is handled correctly (since now we print more than one line).

@Slava
Copy link
Contributor Author

Slava commented Mar 22, 2015

ping :)

@stubailo
Copy link
Contributor

LGTM

@Slava
Copy link
Contributor Author

Slava commented Mar 26, 2015

Yay, merged to release 1.1 branch

(cc @philcockfield)

@Slava Slava closed this Mar 26, 2015
@Slava Slava deleted the tracker-errors branch March 26, 2015 02:35
@hharnisc
Copy link

👍

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.

exceptions logged by Meteor code (not uncaught exceptions) don't use source maps for stack trace
4 participants