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

Error messages are not descriptive #5564

Closed
yfain opened this issue Dec 3, 2015 · 6 comments
Closed

Error messages are not descriptive #5564

yfain opened this issue Dec 3, 2015 · 6 comments

Comments

@yfain
Copy link

@yfain yfain commented Dec 3, 2015

On multiple occasions I've seen messages that are not giving a clue to what was the reason of the error.

Just now I got the runtime message "EXCEPTION: Error trying to diff '[object Object]' in [null]". Go figure. After googling I found three cases with similar messages in Angular's test classes and one in the executable code. All of them had something to do with collections, for example:

if (!isListLikeIterable(collection)) { throw new BaseException(Error trying to diff '${collection}'); }

I got this error in my app that was processing a collection, but it was not clear from the original error message. In this case the error message should include the word "collection".

This was just one case, but error handling in Angular clearly has room for improvement.

@thosakwe
Copy link

@thosakwe thosakwe commented Mar 21, 2016

I agree. Usually when I get this message, it's when I'm using ngFor on something that is not a collection, i.e. an object or null.

@zoechi
Copy link
Contributor

@zoechi zoechi commented Mar 22, 2016

See also #7481

@pkozlowski-opensource
Copy link
Member

@pkozlowski-opensource pkozlowski-opensource commented Mar 22, 2016

General error message improvement is currently tracked in #7481.

@yfain @thosakwe if you've got specific error messages that you think should be improved please open separate, focused issues, describing:

  • condition under an error with confusing error message is thrown
  • proposed error message.

Thank you!

@Sironmani
Copy link

@Sironmani Sironmani commented Apr 25, 2017

while I am using primeng Multiselect dropdown ...I got this error (Error trying to diff '') ..i can't bind the data from service.Please give me solution as early as possible

@zoechi
Copy link
Contributor

@zoechi zoechi commented Apr 25, 2017

@Sironmani You can hardly expect any support for almost no information.
This is the wrong place to ask anyway.

GitHub issues are for bug reports and feature requests.
For support questions please use other channels like the ones listed in CONTRIBUTING - Got a Question or Problem?

@angular-automatic-lock-bot
Copy link

@angular-automatic-lock-bot angular-automatic-lock-bot bot commented Sep 11, 2019

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants