|  |  |  | @ -39,21 +39,12 @@ class Exception extends \Exception implements Arrayable | 
			
		
	
		
			
				
					|  |  |  |  | 	 */ | 
			
		
	
		
			
				
					|  |  |  |  | 	protected function toArrayRecursive($exception) | 
			
		
	
		
			
				
					|  |  |  |  | 	{ | 
			
		
	
		
			
				
					|  |  |  |  | 		if ($exception instanceof self) { | 
			
		
	
		
			
				
					|  |  |  |  | 			$array = array( | 
			
		
	
		
			
				
					|  |  |  |  | 				'type' => get_class($exception), | 
			
		
	
		
			
				
					|  |  |  |  | 				'name' => $exception->getName(), | 
			
		
	
		
			
				
					|  |  |  |  | 				'message' => $exception->getMessage(), | 
			
		
	
		
			
				
					|  |  |  |  | 				'code' => $exception->getCode(), | 
			
		
	
		
			
				
					|  |  |  |  | 			); | 
			
		
	
		
			
				
					|  |  |  |  | 		} else { | 
			
		
	
		
			
				
					|  |  |  |  | 			$array = array( | 
			
		
	
		
			
				
					|  |  |  |  | 				'type' => get_class($exception), | 
			
		
	
		
			
				
					|  |  |  |  | 				'name' => 'Exception', | 
			
		
	
		
			
				
					|  |  |  |  | 				'message' => $exception->getMessage(), | 
			
		
	
		
			
				
					|  |  |  |  | 				'code' => $exception->getCode(), | 
			
		
	
		
			
				
					|  |  |  |  | 			); | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  |  | 		$array = array( | 
			
		
	
		
			
				
					|  |  |  |  | 			'type' => get_class($exception), | 
			
		
	
		
			
				
					|  |  |  |  | 			'name' => $exception instanceof self ? $exception->getName() : 'Exception', | 
			
		
	
		
			
				
					|  |  |  |  | 			'message' => $exception->getMessage(), | 
			
		
	
		
			
				
					|  |  |  |  | 			'code' => $exception->getCode(), | 
			
		
	
		
			
				
					|  |  |  |  | 		); | 
			
		
	
		
			
				
					|  |  |  |  | 		if (($prev = $exception->getPrevious()) !== null) { | 
			
		
	
		
			
				
					|  |  |  |  | 			$array['previous'] = $this->toArrayRecursive($prev); | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
	
		
			
				
					|  |  |  | 
 |