mirror of
https://github.com/elyby/accounts.git
synced 2024-11-30 02:32:26 +05:30
21 lines
397 B
PHP
21 lines
397 B
PHP
<?php
|
|
namespace console\components;
|
|
|
|
use Swift_TransportException;
|
|
use Yii;
|
|
use yii\queue\ErrorEvent;
|
|
|
|
class ErrorHandler {
|
|
|
|
public function handleQueueError(ErrorEvent $error): void {
|
|
$exception = $error->error;
|
|
if ($exception instanceof Swift_TransportException) {
|
|
Yii::warning($exception);
|
|
return;
|
|
}
|
|
|
|
Yii::error($exception);
|
|
}
|
|
|
|
}
|