RamblingCookieMonster / Invoke-Parallel

Speed up PowerShell with simplified multithreading
MIT License
384 stars 88 forks source link

NullReferenceException #44

Closed 176coding closed 7 years ago

176coding commented 7 years ago
Get-RunspaceData : Object reference not set to an instance of an object.
At D:\prism\CDaaS\UtilityTools\Invoke-Parallel.ps1:570 char:25
+                         Get-RunspaceData
+                         ~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], NullReferenceEx 
   ception
    + FullyQualifiedErrorId : System.NullReferenceException,Get-RunspaceData
RamblingCookieMonster commented 7 years ago

Hi!

Copy and paste from your other issue, which seems applicable:

Can you post the code that lead to this error? Unfortunately, any error in your code will look like it's coming from 'Get-RunspaceData', given how we handle errors. You'll find similar behavior in most runspace tools out there.

More details in the last 3 comments of this issue

A good alternative is to use error handling in your code, and throw specific errors that you can use to figure out what part of the code is causing trouble.

Cheers!