So I’m having an issue getting a try/catch block to function correctly and have spent several days trying to correct it, with no luck at this point. So I am hoping someone can lend a hand.
Basically what I have is a “New-UDinput -type File” that takes a CSV and attempts to create users based off of the info in the CSV. I am using custom objects (in both try and catch) to generate information for logging purposes. The output is a New-UDtable inside of a New-UDModal.
If there are no errors the try block works as expected.
The problem I am having is when there is an error and the catch block is run. The custom object does not complete.
Here is a screengrab of the output of the try block.
Here is a screengrab of the catch block that is not working.
Here is a sample of code.
Any help would be appreciated. At this point I’m kind of lost.