ソースを参照

Move more exceptions to 404

Mark Scherer 10 年 前
コミット
5288959abd
1 ファイル変更11 行追加1 行削除
  1. 11 1
      src/Error/ErrorHandler.php

+ 11 - 1
src/Error/ErrorHandler.php

@@ -39,7 +39,17 @@ class ErrorHandler extends CoreErrorHandler {
 			'Cake\Routing\Exception\MissingControllerException',
 			'Cake\Routing\Exception\MissingActionException',
 			'Cake\Routing\Exception\PrivateActionException',
-			'Cake\Routing\Exception\NotFoundException'];
+			'Cake\Routing\Exception\NotFoundException',
+			'Cake\Datasource\Exception\RecordNotFoundException',
+			'Cake\Network\Exception\MethodNotAllowedException',
+			'Cake\Network\Exception\BadRequestException',
+			'Cake\Network\Exception\ForbiddenException',
+			'Cake\Network\Exception\GoneException',
+			'Cake\Network\Exception\ConflictException',
+			'Cake\Network\Exception\InvalidCsrfToken',
+			'Cake\Network\Exception\UnauthorizedException',
+			'Cake\Network\Exception\NotAcceptableException',
+		];
 		if (isset($this->_options['log404'])) {
 			$blacklist = $this->_options['log404'];
 		}