Skip to content

Commit 64384cd

Browse files
authored
removed debugging in catch clause
1 parent 1c6c5d8 commit 64384cd

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

ReportingServicesTools/Functions/CatalogItems/New-RsSubscription.ps1

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -372,21 +372,8 @@ function New-RsSubscription
372372
catch
373373
{
374374
$ex = $_.Exception;
375-
Write-CallStack -ErrorRecord $_ -Skip 0
376375
$ErrorMessage = $ex.Message;
377-
$StackTrace = $ex.StackTrace;
378-
$FailedItem = $ex.ItemName;
379-
$ErrorMessage = $ex.Message
380-
$tabCount = 1;
381-
while ($ex.InnerException) {
382-
$ex = $ex.InnerException
383-
$tabs = "`t" * $tabCount
384-
$ErrorMessage += "`n$tabs" + $ex.Message
385-
$StackTrace += "`n$tabs" + $ex.StackTrace;
386-
}
387-
388-
389-
throw (New-Object System.Exception("Exception occurred while creating subscription! ErrorMessage: [$ErrorMessage] StackTrace [$StackTrace] FailedItem [$FailedItem]", $Exception))
376+
throw (New-Object System.Exception("Exception occurred while creating subscription! ErrorMessage: [$ErrorMessage]", $Exception))
390377
}
391378
}
392379
}

0 commit comments

Comments
 (0)