router icon indicating copy to clipboard operation
router copied to clipboard

Show if class or method does not exists

Open givanov95 opened this issue 3 years ago • 5 comments
trafficstars

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.

givanov95 avatar Jul 21 '22 12:07 givanov95

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.

bramus avatar Jul 28 '22 11:07 bramus

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

https://github.com/bramus/router/pull/188

xnan-dev avatar Aug 11 '22 00:08 xnan-dev

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

xnan-dev avatar Aug 30 '22 19:08 xnan-dev

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

Yep, works great, thank you

givanov95 avatar Mar 05 '23 20:03 givanov95

Would You please merge it, thanks again!

givanov95 avatar Mar 07 '23 07:03 givanov95