Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Extract extra info from headers_sent #13

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
EmitterException, detect output target
undercloud authored Mar 30, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit af4c40ec872b47de26e1dd49e63ad5e10c517adc
10 changes: 8 additions & 2 deletions src/Exception/EmitterException.php
Original file line number Diff line number Diff line change
@@ -13,9 +13,15 @@

class EmitterException extends RuntimeException implements ExceptionInterface
{
public static function forHeadersSent() : self
public static function forHeadersSent(string $file, int $line) : self
{
return new self('Unable to emit response; headers already sent');
return new self(
sprintf(
'Unable to emit response; headers already sent, output started at %s:%d',
$file,
$line
)
);
}

public static function forOutputSent() : self