Calculated properties do not throw exceptions - by Tim Burris

Status : 


Sign in
to vote
ID 782842 Comments
Status Active Workarounds
Type Bug Repros 0
Opened 4/2/2013 10:55:27 AM
Access Restriction Public


Calculated properties do not throw exceptions, even when throw is explicitly specified within the Expression ScriptBlock.

In the real world, we want to look up an IP Address by machine name in a calculated property, and throw if the machine does not exist.  Instead of an exception during lookup, we get a $null property and silently invalid data that doesn't get caught until much later.
Sign in to post a comment.