PHP code example of violet88 / bugsnag-silverstripe
1. Go to this page and download the library: Download violet88/bugsnag-silverstripe 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/ */
violet88 / bugsnag-silverstripe example snippets
use Violet88\BugsnagModule\Bugsnag;
use Exception;
use SilverStripe\Core\Injector\Injector;
try{
//do something
} catch (Exception $e) {
$bugsnag = Injector::inst()->get(Bugsnag::class);
$bugsnag->sendException($e);
}