|  |  |  | @ -81,6 +81,7 @@ class ErrorHandler extends Component | 
			
		
	
		
			
				
					|  |  |  |  | 			if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest') { | 
			
		
	
		
			
				
					|  |  |  |  | 				\Yii::$app->renderException($exception); | 
			
		
	
		
			
				
					|  |  |  |  | 			} else { | 
			
		
	
		
			
				
					|  |  |  |  | 				try { | 
			
		
	
		
			
				
					|  |  |  |  | 					$view = new View; | 
			
		
	
		
			
				
					|  |  |  |  | 					if (!YII_DEBUG || $exception instanceof UserException) { | 
			
		
	
		
			
				
					|  |  |  |  | 						$viewName = $this->errorView; | 
			
		
	
	
		
			
				
					|  |  |  | @ -91,6 +92,10 @@ class ErrorHandler extends Component | 
			
		
	
		
			
				
					|  |  |  |  | 						'exception' => $exception, | 
			
		
	
		
			
				
					|  |  |  |  | 					), $this); | 
			
		
	
		
			
				
					|  |  |  |  | 				} | 
			
		
	
		
			
				
					|  |  |  |  | 				catch (\Exception $e) { | 
			
		
	
		
			
				
					|  |  |  |  | 					\Yii::$app->renderException($e); | 
			
		
	
		
			
				
					|  |  |  |  | 				} | 
			
		
	
		
			
				
					|  |  |  |  | 			} | 
			
		
	
		
			
				
					|  |  |  |  | 		} else { | 
			
		
	
		
			
				
					|  |  |  |  | 			\Yii::$app->renderException($exception); | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
	
		
			
				
					|  |  |  | 
 |