Logging of Error Records

I have a question regarding the logging of errors. I am currently using version 3.8.4 of the toolkit. It seems that there has been a change over time in the way error messages get logged.
For example, if I construct an error during the execution of Execute-Process, like this:


then only the toplevel error record gets logged both in the context of Execute-Process and Deploy Application:

This is not very useful because the most meaningful message that there is something wrong with “DoesNotExist.exe” gets lost.

If I run the same script with an older version of the toolkit (in my case 3.6.8), the error logging is much more meaningful:

I tried to analyse what may cause the difference and I figured out so far that the implementation of Resolve-Error has slitely changed. When I overwrite Resolve-Error that’s in version 3.8.4 with the old implementation of version 3.6.8, the error logging looks much more practical:

I am wondering if the change in the behavior of Resolve-Error was intended this way? Would it not make more sense to do the error logging like in the older versions?

Hi there,

I’m guessing this may have been an unintended consequence of fixing some specific issues when an error was thrown. Would you mind logging an issue on GitHub? I’d like to make sure this is fixed and independently tested for the next 3.x release.

Thanks, Dan

1 Like

Thank you!
I have opened an issue on GitHub: #657
Regards, Thomas