PHP code example of andrey-helldar / sentriable-laravel

1. Go to this page and download the library: Download andrey-helldar/sentriable-laravel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

andrey-helldar / sentriable-laravel example snippets


$app->register(\DragonCode\Sentry\ServiceProvider::class);

use DragonCode\Sentry\Traits\Sentriable;
use Throwable;

public function report(Throwable $exception)
{
    parent::report($exception);

    if ($this->shouldReport($e)) {
        $this->sentryException($e);
    }
}

use DragonCode\Sentry\Traits\Sentriable;
use Exception;

public function report(Exception $exception)
{
    parent::report($exception);

    if ($this->shouldReport($e)) {
        $this->sentryException($e);
    }
}

use DragonCode\Sentry\Traits\Sentriable
use Throwable;

protected function handle()
{
    try {
        // some code
    } catch (Throwable $e) {
        $this->sentryException($e);
    }
}

use DragonCode\Sentry\Traits\Sentriable;
use Throwable;

protected function handle()
{
    foreach ($this->values as $item) {
        try {
            $this->sentryFlush();
        
            // some code
        } catch (Throwable $e) {
            $this->sentryException($e);
        }
    }
}

use DragonCode\Sentry\Facades\Sha;

return [
    // ...
    'release' => Sha::get()
    // ...
];