mirror of
				https://github.com/elyby/accounts.git
				synced 2025-05-31 14:11:46 +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);
 | 
						|
    }
 | 
						|
 | 
						|
}
 |