Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tnort's avatar
Level 4

Send the user back if an error thrown

Hi all,

Would anyone be able to help me with error handling process.

How can I send the user back or to a specific page if an error was thrown (any kind of error in controller).

Fo example sometimes I have students with degree level set sometimes not and instead of blowing up my app I want to safely sent the user back to home page. What would be the best case except checking if user has a degree level in controller ...etc

thank you very much !

0 likes
2 replies
tnort's avatar
Level 4

Thank you! I will go through see if I can find something.

Please or to participate in this conversation.