public function PrintEngineException::getPrettyMessage in Entity Print 8.2
Gets a pretty version of the exception message.
Return value
string The pretty message.
File
- src/
PrintEngineException.php, line 22
Class
- PrintEngineException
- The exception thrown when a implementation fails to generate a document.
Namespace
Drupal\entity_printCode
public function getPrettyMessage() {
// Build a safe markup string using Xss::filter() so that the instructions
// for installing dependencies can contain quotes.
$default_message = (string) $this
->t('Error generating document: @message', [
'@message' => new FormattableMarkup(Xss::filter($this
->getMessage()), []),
]);
return $this
->refineMessage($this
->getMessage()) ?: $default_message;
}