public function present($value) { $label = 'exc'; if ($value instanceof ErrorException) { $value = $value->getPrevious(); $label = 'err'; } return sprintf('[%s:%s("%s")]', $label, get_class($value), $value->getMessage()); }