コード例 #1
0
 public function testIgnoreExceptions()
 {
     $client = Client::create(array('host' => 'localhost:1', 'public_key' => 'public', 'secret_key' => 'secret', 'project_id' => '1337', Client::CURL_OPTIONS => array(CURLOPT_CONNECTTIMEOUT => 0), 'ignored_exceptions' => array('InvalidArgumentException' => true, 'RuntimeException' => false, 'Exception')));
     $this->variable($client->captureException(new \Exception()))->isNull()->variable($client->captureException(new \InvalidArgumentException()))->isNull()->exception(function () use($client) {
         // check that this exception is not ignored, and that the client tries to send it
         $client->captureException(new \RuntimeException());
     });
 }
コード例 #2
0
ファイル: Client.php プロジェクト: hjr3/SentryBundle
 public function __construct(array $config = array())
 {
     // ignore the previous params cached by the container
     $config['command']['params']['tags']['php_version'] = phpversion();
     $config['command']['params']['tags']['symfony_version'] = Kernel::VERSION;
     $config['command']['params']['server_name'] = gethostname();
     parent::__construct($config);
 }
コード例 #3
0
 private function createClient()
 {
     return Client::create(array('public_key' => 'public', 'secret_key' => 'secret', 'project_id' => '1337'));
 }