K
K
knowledge2018-01-30 21:01:21
PHP
knowledge, 2018-01-30 21:01:21

Displaying error messages on exceptions?

An exception happened while executing the code, how can I redirect to a custom error page? Let's say 404 or 403?
Call the controller and action or is it a perversion?
Through htaccess I do not want to prescribe ErrorDocument

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dmitriy, 2018-01-31
@dmitriylanets

1.redirect, no?
2. There are different exceptions, validationError for example, are you sure that 404 will do?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question