mirror of
https://github.com/elyby/accounts.git
synced 2024-12-27 07:30:18 +05:30
23 lines
421 B
PHP
23 lines
421 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace console\components;
|
|
|
|
use Swift_TransportException;
|
|
use Yii;
|
|
use yii\queue\ExecEvent;
|
|
|
|
class ErrorHandler {
|
|
|
|
public function handleQueueError(ExecEvent $error): void {
|
|
$exception = $error->error;
|
|
if ($exception instanceof Swift_TransportException) {
|
|
Yii::warning($exception);
|
|
return;
|
|
}
|
|
|
|
Yii::error($exception);
|
|
}
|
|
|
|
}
|