ember-render-modifiers icon indicating copy to clipboard operation
ember-render-modifiers copied to clipboard

improve debugging possibilities of error messages

Open lifeart opened this issue 5 years ago • 2 comments

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)

lifeart avatar Oct 08 '20 09:10 lifeart

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

gnclmorais avatar Oct 06 '21 07:10 gnclmorais

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 ;)

NullVoxPopuli avatar Oct 06 '21 14:10 NullVoxPopuli