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 · 5 comments

Comments

Projects
None yet
5 participants
@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

This comment has been minimized.

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

This comment has been minimized.

Contributor

zoechi commented Mar 22, 2016

See also #7481

@pkozlowski-opensource

This comment has been minimized.

Member

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

This comment has been minimized.

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

This comment has been minimized.

Contributor

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?

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