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

Show if class or method does not exists #185

Open
givanov95 opened this issue Jul 21, 2022 · 5 comments
Open

Show if class or method does not exists #185

givanov95 opened this issue Jul 21, 2022 · 5 comments

Comments

@givanov95
Copy link

I'm Using the Router and extending it in my own class in order to change some methods and update the router without loosing changes. The invoke() method is private and I need to catch if no Class or method exists and return it.
I found that there is a catch of The ReflectionException in invoke() method, and I think that's exactly what I need but it's a private and I cannot override it. Is there another way to return message that a class or method does not exists, because now it shows an white screen, when the name of the class or method is wrong.

@bramus
Copy link
Owner

bramus commented Jul 28, 2022

An addition to bramus/router that throws this Exception would be the best I guess. I am open to a PR that adds this behavior.

@xnan-dev
Copy link

I have added the requested feature and just made a pull request.

#188

@xnan-dev
Copy link

@bramus @givanov95 , did you have the chance to look at the pull request solution ? thanks in advance! xnan.

@givanov95
Copy link
Author

@bramus @givanov95 , did you have the chance to look at the pull request solution ? thanks in advance! xnan.

Yep, works great, thank you

@givanov95 givanov95 reopened this Mar 5, 2023
@givanov95
Copy link
Author

Would You please merge it, thanks again!

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

No branches or pull requests

3 participants