Skip to content

Instantly share code, notes, and snippets.

@martin9700
Created November 17, 2015 01:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save martin9700/4156552ee78509d03f10 to your computer and use it in GitHub Desktop.
Save martin9700/4156552ee78509d03f10 to your computer and use it in GitHub Desktop.
$ErrorHandlerScript = {
Param(
$Sender,
$Event
)
$Message.Add([PSCustomObject]@{
Number = $Event.Errors.Number
Line = $Event.Errors.LineNumber
Message = $Event.Errors.Message
}) | Out-Null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment