/** * returns the error code and message as a string for logging * works with DoctrineException * @param mixed $error * @return string */ public static function getErrorMessage($error) { if (self::$connection) { return self::$connection->getError(); } return ''; }