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

improve debugging possibilities of error messages #23

Open
lifeart opened this issue Oct 8, 2020 · 2 comments · May be fixed by #50
Open

improve debugging possibilities of error messages #23

lifeart opened this issue Oct 8, 2020 · 2 comments · May be fixed by #50

Comments

@lifeart
Copy link

lifeart commented Oct 8, 2020

image

If passed fn for did-insert is not an function, it's literally udebuggable across application (there is no mentions of key name, component name, closest dom node and such)

@gnclmorais
Copy link

I’d be happy to have a go at this. I’ve been bitten by it before… 😅

@NullVoxPopuli
Copy link
Contributor

Maybe the error could read:

<div
    {{did-insert undefined}}
                 ^ Expected value to be a function, instead received "undefined"


This error occurred in: "path/to/file" on line #, column #.
And was encountered while rendering:
  <ComponentA>
    <ComponentB>
        <ThisComponnent> <- this component

?

I think there are apis for getting the component stack? I forget what they are though?
maybe @rwjblue remembers ;)

@lifeart lifeart changed the title improve debugging messages improve debugging possibilities of error messages Oct 6, 2021
gnclmorais added a commit to gnclmorais/ember-render-modifiers that referenced this issue Oct 12, 2021
When the passed `fn` to the helper is not a function, this commit
improves the error message users will see, hopefully helping with
the debugging process.

Fixes emberjs#23
@gnclmorais gnclmorais linked a pull request Oct 12, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants