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

Specific information in template errors #11274

Closed
literakl opened this issue Apr 3, 2020 · 1 comment
Closed

Specific information in template errors #11274

literakl opened this issue Apr 3, 2020 · 1 comment

Comments

@literakl
Copy link

literakl commented Apr 3, 2020

What problem does this feature solve?

I have a trouble with template bugs. The vue warning identifies the file but not the specific location of the error. For example when I access some property of undefined object I receive the name of property and that is all. If this property has multiple occurences it is hard to find which is the root cause. The source map unfortunatelly does not apply for template code.

[Vue warn]: Error in render: "TypeError: Cannot read property 'since' of undefined"
found in
---> <Profile> at src/views/Profile.vue
   <App> at src/App.vue
     <Root>

This error from the error handler is useless too:

TypeError: Cannot read property 'since' of undefined
at Proxy.render (Profile.vue?08f5:69)
at VueComponent.Vue._render (vue.runtime.esm.js:3548)
at VueComponent.updateComponent (vue.runtime.esm.js:4066)
at Watcher.get (vue.runtime.esm.js:4479)
at Watcher.run (vue.runtime.esm.js:4554)
at flushSchedulerQueue (vue.runtime.esm.js:4310)
at Array.<anonymous> (vue.runtime.esm.js:1980)
at flushCallbacks (vue.runtime.esm.js:1906)

I prepared minimum reproducible project: https://wwww.github.com/literakl/vue-errors

What does the proposed API look like?

The error can look this way:

[Vue warn]: Error in render at line 35: "TypeError: Cannot read property 'since' of undefined"
found in
---> <Profile> at src/views/Profile.vue
   <App> at src/App.vue
     <Root>
@posva
Copy link
Member

posva commented Apr 3, 2020

Duplicate of #10966

@posva posva marked this as a duplicate of #10966 Apr 3, 2020
@posva posva closed this as completed Apr 3, 2020
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

2 participants