when I run a script and it throws an exception, another script is run (log script). I have to give the current error object to the log script.
try { New-Item