Piwik\Plugins\API\Renderer\Csv::renderException PHP 메소드

renderException() 공개 메소드

public renderException ( $message, Exception | Throwable $exception ) : string
$message
$exception Exception | Throwable
리턴 string
    public function renderException($message, $exception)
    {
        Common::sendHeader('Content-Type: text/html; charset=utf-8', true);
        return 'Error: ' . $message;
    }

Usage Example

예제 #1
0
    public function test_renderException_shouldRespectNewlines()
    {
        $response = $this->builder->renderException("The\nerror\nmessage", new \Exception('The other message'));
        $this->assertEquals('Error: The
error
message', $response);
    }