/** * Retrieves error string given a message key for lookup * * @static * @param string $messageKey * @return string|false Returns the error string if found; FALSE otherwise */ public static function getExceptionMessage($messageKey) { if (!self::$_messages) { // Lazy-init messages self::$_messages = array('DoctrineException#partialObjectsAreDangerous' => "Loading partial objects is dangerous. Fetch full objects or consider " . "using a different fetch mode. If you really want partial objects, " . "set the doctrine.forcePartialLoad query hint to TRUE.", 'QueryException#nonUniqueResult' => "The query contains more than one result."); } if (isset(self::$_messages[$messageKey])) { return self::$_messages[$messageKey]; } return false; }