src/Parallel.php
protected static function convertResult(array $result) {
        $errors = array();
        
        foreach($result as $id => $value) {
            if($value instanceof \Throwable) {
                $errors[$id] = $value;
            }
        }
        
        if(!empty($errors)) {
            throw new \CharlotteDunois\Phoebe\MultiReasonException($errors);
        }
        
        return $result;
    }
protected static function convertResult(array $result) {
        $errors = array();
        
        foreach($result as $id => $value) {
            if($value instanceof \Throwable) {
                $errors[$id] = $value;
            }
        }
        
        if(!empty($errors)) {
            throw new \CharlotteDunois\Phoebe\MultiReasonException($errors);
        }
        
        return $result;
    }
Converts the result into a multi reason exception, or returns the result.
@param array  $result
@return array
@throws \CharlotteDunois\Phoebe\MultiReasonException