Skip to content

Commit 6a1d068

Browse files
author
Alex Westergaard
committed
Add deprecated notice to exception
1 parent 996c15b commit 6a1d068

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/GA4Exception.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22

33
namespace AlexWestergaard\PhpGa4;
44

5+
use AlexWestergaard\PhpGa4\Exception\Ga4Exception as ExceptionGa4Exception;
6+
57
/** @deprecated 1.1.1 */
68
class GA4Exception extends \Exception
79
{
10+
public function __construct(string $message = "", int $code = 0, \Throwable|null $previous = null)
11+
{
12+
$new = new ExceptionGa4Exception($message, $code);
13+
parent::__construct("This exception is deprecated, check previous for your exception", 0, $new);
14+
}
815
}

0 commit comments

Comments
 (0)