public function formatException(\Exception $ex)
    {
        return sprintf(
            $this->errorMessageFormat,
            $ex->getMessage(),
            $ex->getCode(),
            $ex->getFile(),
            $ex->getLine(),
            get_class($ex)
        );
    }