thephpleague / route

Fast PSR-7 based routing and dispatch component including PSR-15 middleware, built on top of FastRoute.
http://route.thephpleague.com
MIT License
651 stars 126 forks source link

Override the base exception class for JsonStrategy #227

Closed Ghost-str closed 5 years ago

Ghost-str commented 5 years ago

How can I override the base exception class for JsonStrategy, I need to

  1. log some errors
  2. another error object
philipobenito commented 5 years ago

By using a custom strategy http://route.thephpleague.com/4.x/strategies/#custom-strategies

You can extend the existing JsonStrategy if you need to.