 <p>I know the option the <code>(b)</code> you can entirely disable Silex app error handler and after that, your custom error handler should work fine as you defined it.</p> <p>Entirely disabled Silex error handler:</p> <pre><code>$app['exception_handler']-&gt;disable(); </code></pre> <p>So, It will be like:</p> <pre><code>require_once 'Exception.php'; # Load the class $handler = new ErrorHandler(); # Initialize/Register it $app = new \Silex\Application(); $app-&gt;get('/', function () use ($app) { nonexistentfunction(); trigger_error("example"); throw new \Exception("example"); }); $app-&gt;run(); </code></pre>