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

consider removing trycatch in runCallback #19

Open
jwillinghalpern opened this issue Apr 4, 2021 · 0 comments
Open

consider removing trycatch in runCallback #19

jwillinghalpern opened this issue Apr 4, 2021 · 0 comments

Comments

@jwillinghalpern
Copy link
Owner

Think more about this. The main reason I added this was so it would be obvious when you misconfigure your callback. For example if you pass in a non-existent callback id, then the promise variable will return undefined. Then promise.timeoutID will throw an error because you can't get a property of undefined.

We should add an explicit error message for when typeof promise === 'undefined'.

Then decide if we should actually log an error and alert(), or if we should let the exception bubble up.

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

No branches or pull requests

1 participant