You are right - the problem is not the original FAILSTEP_OUTPUT macro. When a failure arise, my first failure step is to copy the FAILSTEP_OUTPUT macro to a temporary macro for safe keeping (another step failing and overwrite the original FAILSTEP_OUTPUT macro).
Original FAILSTEP_OUTPUT macro value:
System.Threading.WaitHandle.WaitAll(WaitHandle[[]] waitHandles)
Copy made: LAST_ERROR_MESSAGE temporary macro value:
System.Threading.WaitHandle.WaitAll(WaitHandle[] waitHandles)
The copy step is the first job in the failure steps, and is using a "Set Macro". The value of this step is %FAILSTEP_OUTPUT% which deletes the extra [ and ] chars. When using the copy in a send email step, an error arise.
Attached is a build script that can reproduce this failure
|