Search notes:

PowerShell: the automatic variable $error

Type of $error

The type of $error is System.Collections.ArrayList:
PS C:\> $error.GetType().FullName
System.Collections.ArrayList
The individual elements of this ArrayList have the type System.Management.Automation.ErrorRecord:
PS C:\> $error[0].GetType().FullName
System.Management.Automation.ErrorRecord

Content of $error

$error stores non-terminating errors (which are described by the ErrorRecord type).

See also

The common cmdlet parameter -errorVariable
Other automatic variables
Error handling in PowerShell

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1759382553, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/PowerShell/language/variable/automatic/error/index(57): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78