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

Add component backtrace on invalid argument exception #139

Open
sascha-egerer opened this issue May 2, 2023 · 2 comments
Open

Add component backtrace on invalid argument exception #139

sascha-egerer opened this issue May 2, 2023 · 2 comments

Comments

@sascha-egerer
Copy link

If an invalid argument is passed to a component an exception is thrown:

The argument "image" defined in "Foo\Bar\FluidComponents\Component\Image" has declared type "SMS\FluidComponents\Domain\Model\Image", but "NULL" was give

Sometimes it's really hard to figure out where the error occurs. It would be very helpful to have a component stack backtrace in the exception.
The argument "image" defined in "Foo\Bar\FluidComponents\Component\Image" has declared type "SMS\FluidComponents\Domain\Model\Image", but "NULL" was give in Foo\Bar\FluidComponents\Module\Layout\Page\Default -> Foo\Bar\FluidComponents\Module\Footer -> Foo\Bar\FluidComponents\Module\LogoBox -> Foo\Bar\FluidComponents\Component\Link -> Foo\Bar\FluidComponents\Component\Image

@s2b
Copy link
Collaborator

s2b commented Jun 8, 2023

Good idea! This could be based on #144 which introduces a data structure for component metadata.

@sascha-egerer
Copy link
Author

sascha-egerer commented Jun 8, 2023

Yeah I have a patch ready based on a previous patch of named slots. I can push it one rebased on master

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