I know this is a big NO NO ... and the developer error pages should not be displayed while my site is alive, what can I do to prevent dev environment error messages from appearing during production?

Why do they appear? I thought it was disabled by default in production mode? Did I skip the setup?
Note. . This is on a shared server. And I use app.php not app_dev.php.
When I go into production mode, it correctly displays the correct error messages (below):
Oops! An error has occurred. The server returned "404 Not Found." Something broke. Send us an email and let us know what you did when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience.
However, on a live site, a Symfony2 dev environment error message is displayed?
I tried to create my own error message by creating the error404.html.twig file in the application / Resource / TwigBundle / views / Exception , but it still does not load this file and just displays the developer error message.
source share