As shown in a community forum discussion, there is a potential for a PDOException to return a code value that is alphanumeric, but PHP strict typing declares the code parameter to be of type INT. Ironically, the PHP documentation for Exception::getCode, which declares the parameter to be of type INT, even states that PDOException may return a string value. 🤦
If extending from these exceptions, to prevent errors, some typecasting will likely be necessary on the code property.