Skip to content
Browse files

Use config to avoid some exception

- remove the exception test from the client
- fixed #2
- updated doc for raven.yml part (where to put it)
  • Loading branch information...
1 parent 9a0b5c6 commit 645cd329cb648b21f62fbfa123432ca962d931d9 @j0k3r committed
Showing with 9 additions and 13 deletions.
  1. +4 −2 README.md
  2. +2 −0 config/raven.yml
  3. +3 −1 config/sfRavenPluginConfiguration.class.php
  4. +0 −10 lib/sfRavenClient.class.php
View
6 README.md
@@ -26,7 +26,6 @@ Add to your project configuration:
{
$this->enablePlugins(array(
// ...
-
'sfRavenPlugin',
));
}
@@ -42,7 +41,10 @@ Enable logging to all your environments:
Configure the Raven client. The DSN can be found in the getsentry interface.
- # app/raven.yml
+ # app/[app_name]/config/raven.yml
+ # OR config/raven.yml
all:
dsn: udp://11111111111111111111111111111111:22222222222222222222222222222222@localhost:9001/1
+ exclude_exceptions:
+ - sfStopException
View
2 config/raven.yml
@@ -1,3 +1,5 @@
all:
# Sentry connection URL
dsn: ~
+ exclude_exceptions:
+ - sfStopException
View
4 config/sfRavenPluginConfiguration.class.php
@@ -27,7 +27,9 @@ public function initialize()
return;
}
- $client = new sfRavenClient(sfConfig::get('raven_dsn'));
+ $client = new sfRavenClient(sfConfig::get('raven_dsn'), array(
+ 'exclude' => sfConfig::get('raven_exclude_exceptions', array())
+ ));
$this->errorHandler = new Raven_ErrorHandler($client);
$this->errorHandler->registerExceptionHandler();
View
10 lib/sfRavenClient.class.php
@@ -2,16 +2,6 @@
class sfRavenClient extends Raven_Client
{
- public function captureException($exception, $culprit = null, $logger = null, $vars = null)
- {
- if ($exception instanceof sfStopException)
- {
- return;
- }
-
- parent::captureException($exception, $culprit, $logger, $vars);
- }
-
protected function get_user_data()
{
if (!sfContext::hasInstance())

0 comments on commit 645cd32

Please sign in to comment.
Something went wrong with that request. Please try again.