Skip to content

Commit

Permalink
Merge branch 'sentry-update'
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronHolbrook committed Mar 16, 2021
2 parents 71d74c3 + 1065c82 commit 6dcecb9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
}
],
"autoload": {
"psr-4": {
"Zeek\\WP_Util\\": "src-psr-4/"
},
"files": ["package.php"]
},
"autoload-dev": {
Expand All @@ -39,6 +42,6 @@

"zeek/php-utils": ">=2",

"zeek/wp-sentry": "^1.0"
"zeek/wp-sentry": "^1.1"
}
}
14 changes: 14 additions & 0 deletions src-psr-4/ErrorHandling.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace Zeek\WP_Util;

use Zeek\WP_Util\Interfaces\ErrorHandling as ErrorHandlingInterface;
use Zeek\WpSentry\WpSentry;

class ErrorHandling implements ErrorHandlingInterface {
public static function capture( \Exception $exception ) : void {
$sentry = WpSentry::getInstance();

$sentry->captureException($exception);
}
}
7 changes: 7 additions & 0 deletions src-psr-4/Interfaces/ErrorHandling.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace Zeek\WP_Util\Interfaces;

interface ErrorHandling {
public static function capture( \Exception $exception ) : void;
}

0 comments on commit 6dcecb9

Please sign in to comment.