protected function StaticUITrait::formatPathException in Tome 8
Formats an exception caught when requesting a path.
Parameters
string $path: The path being exported.
\Exception $exception: An exception.
Return value
\Drupal\Core\StringTranslation\TranslatableMarkup A formatted message to present to the user.
2 calls to StaticUITrait::formatPathException()
- StaticExportPathCommand::execute in modules/
tome_static/ src/ Commands/ StaticExportPathCommand.php - StaticGeneratorForm::exportPath in modules/
tome_static/ src/ Form/ StaticGeneratorForm.php - Exports a path using Tome.
File
- modules/
tome_static/ src/ StaticUITrait.php, line 60
Class
- StaticUITrait
- Trait containing methods useful for different static user interfaces.
Namespace
Drupal\tome_staticCode
protected function formatPathException($path, \Exception $exception) {
return $this
->t('Exception caught when requesting path @path in @file, line @line: @error', [
'@path' => $path,
'@file' => $exception
->getFile(),
'@line' => $exception
->getLine(),
'@error' => $exception
->getMessage(),
]);
}