Hi Marco,
You can make a test by adding your custom error code for 'Protostar' - a standard template of Joomla and set this as default template to see how it goes.
This will help to find out where the issue comes from. If it works with Protostar, then there is something wrong with T3.
If it doesn't work either, the problem would be from your custom code 🙂