public function __toString() { try { return parent::__toString(); } catch (\Exception $ex) { $message = $ex->getMessage(); if ($this->options['output']['errors']) { return $message; } else { trigger_error($message, E_USER_ERROR); return ''; } } }