Skip to content

Commit 9464d66

Browse files
authored
Update ExceptionCatchingDatadogClient.php
1 parent a9e2a1f commit 9464d66

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Clients/Datadog/ExceptionCatchingDatadogClient.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ class ExceptionCatchingDatadogClient extends DogStatsd
1313
*
1414
* @var Closure(Throwable, mixed): void
1515
*/
16-
protected Closure $exceptionCallback;
16+
protected Closure $onExceptionCallback;
1717

1818
/**
1919
* @{inheritDoc}
2020
*
21-
* @param (Closure(\Throwable, mixed): void) $exceptionCallbackHandler The callback to execute when there is an exception flushing stats to DataDog
21+
* @param (Closure(\Throwable, mixed): void) $onExceptionCallback The callback to execute when there is an exception flushing stats to DataDog
2222
*/
2323
#[\Override]
2424
public function __construct(
2525
array $config,
26-
Closure $exceptionCallbackHandler,
26+
Closure $onExceptionCallback,
2727
) {
2828
parent::__construct($config);
2929

30-
$this->exceptionCallback = $exceptionCallbackHandler;
30+
$this->onExceptionCallback = $onExceptionCallback;
3131
}
3232

3333
/**
@@ -40,7 +40,7 @@ public function report($message)
4040
try {
4141
parent::report($message);
4242
} catch (Throwable $exception) {
43-
call_user_func($this->exceptionCallback, $exception, $message);
43+
call_user_func($this->onExceptionCallback, $exception, $message);
4444
}
4545
}
4646
}

0 commit comments

Comments
 (0)