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
base: devel
from

Conversation

Projects
None yet
4 participants
@Slava
Member

Slava commented Feb 26, 2015

  • Allow passing an onError callback to Tracker.autorun.
  • Workaround the issue described in #3655 by logging parts of error message
    separately.

Attempts to fix #3655

@stubailo

This comment has been minimized.

Contributor

stubailo commented Feb 26, 2015

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

@Slava

This comment has been minimized.

Member

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) {

This comment has been minimized.

@glasser

glasser Mar 3, 2015

Member

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

This comment has been minimized.

@Slava

Slava Mar 17, 2015

Member

Will do!

@stubailo

This comment has been minimized.

Contributor

stubailo commented Mar 17, 2015

@Slava ping!

Slava added some commits Feb 26, 2015

Tweaks to error reporting in Tracker.
- Allow passing an onError callback to Tracker.autorun.
- Workaround the issue described in #3655 by logging parts of error message
  separately.

@Slava Slava force-pushed the tracker-errors branch from 0bc289a to a02f97c Mar 17, 2015

@Slava

This comment has been minimized.

Member

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

This comment has been minimized.

Member

Slava commented Mar 22, 2015

ping :)

@stubailo

This comment has been minimized.

Contributor

stubailo commented Mar 26, 2015

LGTM

@Slava

This comment has been minimized.

Member

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 Mar 26, 2015

@hharnisc

This comment has been minimized.

hharnisc commented Mar 26, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment