Skip to content

Conversation

nicolas-grekas
Copy link
Member

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

}
} elseif (!$original || $isCritical) {
error_log($message);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless once #13767 is merged since the importants exceptions will be thrown now, and we have an exception handler that is suited for the prod env

@nicolas-grekas nicolas-grekas force-pushed the logic-x branch 2 times, most recently from a8d2cbb to e821984 Compare February 24, 2015 20:53
@@ -229,7 +229,7 @@ private function handleException(\Exception $e, $request, $type)
if (!$event->hasResponse()) {
$this->finishRequest($request, $type);

throw $e;
throw new \LogicException('Handling "kernel.exception" events should led to a Response', 0, $e);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main goal of this PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Handling of the "kernel.exception" event should lead to a Response' would be better.

Or perhaps 'No "kernel.exception" event listener created a Response'?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reworded the message to No listeners of the "kernel.exception" event set a Response

@fabpot
Copy link
Member

fabpot commented Mar 9, 2015

👍

1 similar comment
@stof
Copy link
Member

stof commented Mar 9, 2015

👍

@nicolas-grekas nicolas-grekas changed the title [HttpKernel] Throw a LogicException when kernel.exception does not led to a Response [HttpKernel] Throw a LogicException when kernel.exception does not lead to a Response Mar 9, 2015
@fabpot
Copy link
Member

fabpot commented Mar 14, 2015

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 22f4807 into symfony:2.7 Mar 14, 2015
fabpot added a commit that referenced this pull request Mar 14, 2015
…ion does not lead to a Response (nicolas-grekas)

This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Throw a LogicException when kernel.exception does not lead to a Response

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

22f4807 [HttpKernel] Throw a LogicException when kernel.exception does not led to a Response
@nicolas-grekas nicolas-grekas deleted the logic-x branch March 16, 2015 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants