Fixes Issue #3501

Added check for $e->getCode() return value, fixes Issue #3501: Exception while createing RuntimeException in Pdo Connection class