• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Sentry + Laravel: how to log an already catched Exception?

phplaravelsentry


PHP Snippet 1:

try {
    // your code that could throw an exception
} catch (\Throwable $e) {
    if (app()->bound('sentry')) {
        app('sentry')->captureException($e);
    }
}

PHP Snippet 2:

try {
    // your code that could throw an exception
} catch (\Throwable $e) {
    report($e); // this is a Laravel helper, not from Sentry
}

PHP Snippet 3:

\Sentry\captureMessage("This handle a text message");

// this handle everything derives from \Exception
\Sentry\captureException($e);

Related Snippets

How can i hide dt if dd got empty value

PHP my timezone is no setting up in PHP.ini File in xampp

Call to a member function fetch_field() on a non-object MySQLiDB

add uri parameter to Route name in laravel

How to send parameters in soap request in php in __soapcall() function

How to run a shell as root from php (apache)

Array to string conversion

Assign output of PHP function to a variable

LARAVEL: How to fetch id dynamically in a query builder?

Session timeout in Yii2

Warning file_get_contents () failed to open stream: HTTP request failed! HTTP/1.0 402 Payment Required

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'posts.post' doesn't exist

Hi, I am making a contact form thingy, and my php isn't working any reason why?

php echo remove slashes from url [duplicate]

Cant seem to get the Pagination to work on my WooCommerce REST API application?

About Contact Privacy policy Terms and conditions