Skip to content

Commit

Permalink
throw CakeException instead, putting throws tag in the comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Xinquan Zhu authored and markstory committed Jul 29, 2014
1 parent 809de69 commit e08b814
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Cake/Network/CakeResponse.php
Expand Up @@ -517,6 +517,7 @@ protected function _setContentLength() {
* @param string $name the header name
* @param string $value the header value
* @return void
* @throws CakeException When an header already been sent
*/
protected function _sendHeader($name, $value = null) {
if (!headers_sent($filename, $linenum)) {
Expand All @@ -527,7 +528,7 @@ protected function _sendHeader($name, $value = null) {
}
} else {
if (Configure::read('debug')) {
throw new Exception(__d('cake_dev', 'Headers already sent in $filename on line $linenum'));
throw new CakeException(__d('cake_dev', 'Headers already sent in $filename on line $linenum'));
}
}
}
Expand Down

0 comments on commit e08b814

Please sign in to comment.