Permalink
Browse files

removed catching specific types of exception and just made it general

  • Loading branch information...
RichieBzzzt committed Jun 22, 2018
1 parent 1ff5f63 commit be957651c2dca5b629a1be4160c6fd5cd968f3f9
Showing with 4 additions and 6 deletions.
  1. +4 −6 PoshSSDTBuildDeploy/Functions/PublishDatabaseDeployment.ps1
@@ -74,15 +74,13 @@ Function Publish-DatabaseDeployment {
Write-Host "Deployment successful!" -ForegroundColor DarkGreen
}
}
catch [Microsoft.SqlServer.Dac.DacServicesException] {
$toThrow = ("Deployment failed: '{0}' Reason: '{1}'" -f $_.Exception.Message, $_.Exception.InnerException.Message)
catch {
$toThrow = ("Deployment failed: '{0}'" -f $_.Exception)
}
finally {
Unregister-Event -SourceIdentifier "msg"
if ($toThrow) {
$error[0]|format-list -force
Throw $toThrow
if ($ToThrow) {
Throw $ToThrow
}
if ($GenerateDeploymentReport -eq $true) {
$result.DeploymentReport | Out-File $DeploymentReport

0 comments on commit be95765

Please sign in to comment.