Skip to content

Commit

Permalink
Stop-PSFFunction in catch block should use -ErrorRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
michalporeba committed Mar 10, 2018
1 parent 2d588f1 commit e7755c0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion functions/Import-DbcConfig.ps1
Expand Up @@ -45,7 +45,7 @@
$results = Get-Content -Path $Path | ConvertFrom-Json
}
catch {
Stop-PSFFunction -Message "Failure" -Exception $_
Stop-PSFFunction -Message "Failure" -ErrorRecord $_
return
}

Expand Down
2 changes: 1 addition & 1 deletion functions/Invoke-DbcConfigFile.ps1
Expand Up @@ -36,7 +36,7 @@
Write-PSFMessage -Level Output -Message "Remember to run Import-DbcConfig when you've finished your edits"
}
catch {
Stop-PSFFunction -Message "Failure" -Exception $_
Stop-PSFFunction -Message "Failure" -ErrorRecord $_
return
}
}
Expand Down
2 changes: 1 addition & 1 deletion functions/Start-DbcPowerBi.ps1
Expand Up @@ -60,7 +60,7 @@
Invoke-Item -Path $path
}
catch {
Stop-PSFFunction -Message "Failure" -Exception $_.Exception
Stop-PSFFunction -Message "Failure" -ErrorRecord $_
return
}
}
Expand Down
4 changes: 2 additions & 2 deletions functions/Update-DbcPowerBiDataSource.ps1
Expand Up @@ -73,7 +73,7 @@
}
}
catch {
Stop-PSFFunction -Message "Failure" -Exception $_
Stop-PSFFunction -Message "Failure" -ErrorRecord $_
return
}

Expand All @@ -94,7 +94,7 @@
Write-PSFMessage -Level Output -Message "Wrote results to $filename"
}
catch {
Stop-PSFFunction -Message "Failure" -Exception $_
Stop-PSFFunction -Message "Failure" -ErrorRecord $_
return
}
}
Expand Down

0 comments on commit e7755c0

Please sign in to comment.