Databases Reference
In-Depth Information
The following example attempts to retrieve the content of a file that doesn't exist in order to simulate an
error, as shown in Figure 3-32, and then tries to get the error information (see Figure 3-36 and Figure 3-37):
get-content testerror.txt
$error[0].InvocationInfo
Figure 3-32
You can display all the errors on the screen just by calling the error variable, $error , as shown here (see
Figure 3-33):
$error
Figure 3-33
Search WWH ::




Custom Search