Skip to content

Commit c45813a

Browse files
committed
return $null in catch block is not really needed
1 parent dfc8bd3 commit c45813a

9 files changed

+0
-9
lines changed

source/Public/Deployment Pipeline/Add-FabricWorkspaceToStage.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,5 @@ function Add-FabricWorkspaceToStage {
7474
# Step 6: Error handling
7575
$errorDetails = $_.Exception.Message
7676
Write-Message -Message "Failed to assign workspace to deployment pipeline stage. Error: $errorDetails" -Level Error
77-
return $null
7877
}
7978
}

source/Public/Deployment Pipeline/Get-FabricDeploymentPipeline.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,5 @@ function Get-FabricDeploymentPipeline {
133133
# Step 8: Error handling
134134
$errorDetails = $_.Exception.Message
135135
Write-Message -Message "Failed to retrieve deployment pipelines. Error: $errorDetails" -Level Error
136-
return $null
137136
}
138137
}

source/Public/Deployment Pipeline/Get-FabricDeploymentPipelineOperation.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,5 @@ function Get-FabricDeploymentPipelineOperation {
7070
# Step 6: Error handling
7171
$errorDetails = $_.Exception.Message
7272
Write-Message -Message "Failed to retrieve deployment pipeline operation. Error: $errorDetails" -Level Error
73-
return $null
7473
}
7574
}

source/Public/Deployment Pipeline/Get-FabricDeploymentPipelineRoleAssignments.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,5 @@ function Get-FabricDeploymentPipelineRoleAssignments {
6868
# Step 8: Error handling
6969
$errorDetails = $_.Exception.Message
7070
Write-Message -Message "Failed to get deployment pipeline role assignments. Error: $errorDetails" -Level Error
71-
return $null
7271
}
7372
}

source/Public/Deployment Pipeline/Get-FabricDeploymentPipelineStage.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,5 @@ function Get-FabricDeploymentPipelineStage {
7373
# Step 6: Error handling
7474
$errorDetails = $_.Exception.Message
7575
Write-Message -Message "Failed to retrieve deployment pipeline stage(s). Error: $errorDetails" -Level Error
76-
return $null
7776
}
7877
}

source/Public/Deployment Pipeline/Get-FabricDeploymentPipelineStageItem.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,5 @@ function Get-FabricDeploymentPipelineStageItem {
8989
# Step 8: Error handling
9090
$errorDetails = $_.Exception.Message
9191
Write-Message -Message "Failed to retrieve deployment pipeline stage items. Error: $errorDetails" -Level Error
92-
return $null
9392
}
9493
}

source/Public/Deployment Pipeline/New-FabricDeploymentPipeline.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,5 @@ function New-FabricDeploymentPipeline {
103103
# Step 6: Error handling
104104
$errorDetails = $_.Exception.Message
105105
Write-Message -Message "Failed to create deployment pipeline. Error: $errorDetails" -Level Error
106-
return $null
107106
}
108107
}

source/Public/Deployment Pipeline/Remove-FabricWorkspaceFromStage.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,5 @@ function Remove-FabricWorkspaceFromStage {
6161
# Step 5: Error handling
6262
$errorDetails = $_.Exception.Message
6363
Write-Message -Message "Failed to unassign workspace from deployment pipeline stage. Error: $errorDetails" -Level Error
64-
return $null
6564
}
6665
}

source/Public/Deployment Pipeline/Start-FabricDeploymentPipelineStage.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,5 @@ function Start-FabricDeploymentPipelineStage {
126126
# Step 6: Error handling
127127
$errorDetails = $_.Exception.Message
128128
Write-Message -Message "Failed to initiate deployment. Error: $errorDetails" -Level Error
129-
return $null
130129
}
131130
}

0 commit comments

Comments
 (0)