Using PowerCLI views provides additional error handling by translating the SoapFault object from the SoapException.Detail property into a MethodFault descendant object and throwing a VimException exception.

Example: Simple Pattern for Error Handling

The following example illustrates a basic pattern implementation of error handling with PowerCLI views.