throw CakeException instead, putting throws tag in the comment

This commit is contained in:
Xinquan Zhu 2014-07-18 14:49:44 +09:00 committed by mark_story
parent 809de69dcf
commit e08b8148a5

View file

@ -517,6 +517,7 @@ class CakeResponse {
* @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)) {
@ -527,7 +528,7 @@ class CakeResponse {
}
} 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'));
}
}
}