Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4812e60

Browse filesBrowse files
committed
add ability to configure catching exceptions
1 parent bc84304 commit 4812e60
Copy full SHA for 4812e60

File tree

Expand file treeCollapse file tree

2 files changed

+13
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+13
-1
lines changed

‎src/Symfony/Component/HttpKernel/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ CHANGELOG
1111
* added `AddCacheClearerPass`
1212
* added `AddCacheWarmerPass`
1313
* deprecated `EnvParametersResource`
14+
* added `Symfony\Component\HttpKernel\Client::catchExceptions()`
1415

1516
3.3.0
1617
-----

‎src/Symfony/Component/HttpKernel/Client.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Client.php
+12-1Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
class Client extends BaseClient
3232
{
3333
protected $kernel;
34+
private $catchExceptions = true;
3435

3536
/**
3637
* Constructor.
@@ -49,6 +50,16 @@ public function __construct(HttpKernelInterface $kernel, array $server = array()
4950
parent::__construct($server, $history, $cookieJar);
5051
}
5152

53+
/**
54+
* Sets whether to catch exceptions when the kernel is handling a request.
55+
*
56+
* @param bool $catchExceptions Whether to catch exceptions
57+
*/
58+
public function catchExceptions($catchExceptions)
59+
{
60+
$this->catchExceptions = $catchExceptions;
61+
}
62+
5263
/**
5364
* Makes a request.
5465
*
@@ -58,7 +69,7 @@ public function __construct(HttpKernelInterface $kernel, array $server = array()
5869
*/
5970
protected function doRequest($request)
6071
{
61-
$response = $this->kernel->handle($request);
72+
$response = $this->kernel->handle($request, HttpKernelInterface::MASTER_REQUEST, $this->catchExceptions);
6273

6374
if ($this->kernel instanceof TerminableInterface) {
6475
$this->kernel->terminate($request, $response);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.