Skip to content

Instantly share code, notes, and snippets.

@jmelosegui
Created April 5, 2022 15:16
Show Gist options
  • Save jmelosegui/edcb833bd4c1ae57afe4e6a2e1cbf1f8 to your computer and use it in GitHub Desktop.
Save jmelosegui/edcb833bd4c1ae57afe4e6a2e1cbf1f8 to your computer and use it in GitHub Desktop.
function Resolve-Error ($ErrorRecord=$Error[0])
{
$ErrorRecord | Format-List * -Force
$ErrorRecord.InvocationInfo | Format-List *
$Exception = $ErrorRecord.Exception
for ($i = 0; $Exception; $i++, ($Exception = $Exception.InnerException))
{ "$i" * 80
$Exception | Format-List * -Force
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment