There's no way to reference the exception that caused a catch block at the moment. The exception should be assigned to $_/$PSItem if it's referenced in the catch block.
Also, looks like I accidently used Enumerable.Count instead of ReadOnlyCollection<>.Count here.