Dmitry Nefedov
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
6 deletions
-
Sophia/PowerShell 5.1/Module/Sophia.psm1
|
@ -12438,13 +12438,13 @@ function Errors |
|
|
{ |
|
|
{ |
|
|
if ($Global:Error) |
|
|
if ($Global:Error) |
|
|
{ |
|
|
{ |
|
|
|
|
|
($Global:Error | ForEach-Object -Process { |
|
|
# Some errors may have the Windows nature and don't have a path to any of the module's files |
|
|
# Some errors may have the Windows nature and don't have a path to any of the module's files |
|
|
$ErrorInFile = if ($_.InvocationInfo.PSCommandPath) |
|
|
$ErrorInFile = if ($_.InvocationInfo.PSCommandPath) |
|
|
{ |
|
|
{ |
|
|
Split-Path -Path $_.InvocationInfo.PSCommandPath -Leaf |
|
|
Split-Path -Path $_.InvocationInfo.PSCommandPath -Leaf |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
($Global:Error | ForEach-Object -Process { |
|
|
|
|
|
[PSCustomObject]@{ |
|
|
[PSCustomObject]@{ |
|
|
$Localization.ErrorsLine = $_.InvocationInfo.ScriptLineNumber |
|
|
$Localization.ErrorsLine = $_.InvocationInfo.ScriptLineNumber |
|
|
$Localization.ErrorsFile = $ErrorInFile |
|
|
$Localization.ErrorsFile = $ErrorInFile |
|
|