Zend\Mvc\View\Console\ExceptionStrategy::setMessage
Set template for message that will be shown in Console.
The message can be a string (template) or a callable (i.e. a closure). The closure is expected to return a string and will be called with 2 parameters: Exception $exception - the exception being thrown boolean $displayExceptions - whether to display exceptions or not If the message is a string, one can use the following template params: :className - full class name of exception instance :message - exception message :code - exception code :file - the file where the exception has been thrown :line - the line where the exception has been thrown :stack - full exception stack
Signature
public function setMessage(string|callable
$message )
Parameters
$message
— object
Returns
- ExceptionStrategy