Exceptions and spacing
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
function Write-ScriptLine
|
||||
{
|
||||
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingWriteHost", "")]
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
function Format-Chronometer
|
||||
{
|
||||
<#
|
||||
@@ -44,6 +42,8 @@ function Format-Chronometer
|
||||
)
|
||||
|
||||
process
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach ( $script in $InputObject )
|
||||
{
|
||||
@@ -62,4 +62,9 @@ function Format-Chronometer
|
||||
Write-ScriptLine $command -WarningAt $WarningAt -ErrorAt $ErrorAt
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
$PSCmdlet.ThrowTerminatingError($PSItem)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,9 +27,12 @@ function Get-Chronometer
|
||||
[alias('Script', 'CommandScript')]
|
||||
[scriptblock]
|
||||
$ScriptBlock
|
||||
|
||||
)
|
||||
|
||||
process
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( $null -eq $Path )
|
||||
{
|
||||
$Path = Get-ChildItem -Recurse -Include *.psm1, *.ps1 -File
|
||||
@@ -67,3 +70,9 @@ function Get-Chronometer
|
||||
Write-Warning "Parsing files did not result in any breakpoints"
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
$PSCmdlet.ThrowTerminatingError($PSItem)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user