Help Me Please! 404 Call Problem On Page

Good afternoon, dear experts.
Tell me, there is a certain condition under which you need to give CONTROLLER_STATUS_NO_PAGE in the controller
but when executed I get errors like .
Although there is a piece of code next to which I make the condition and it works as it should, without an error, tell me, what could be the matter?
Moreover, I just added a 404 return to the controller, and all the same the same errors
And the photo shows a piece that is standard

I see error message from our module. Please leave a request on our website so that our specialists can check it