Пример #1
0
        void HandleUnityLog(string message, string stackTrace, LogType type)
        {
            if (!logDestroyed && !GameLogger.GetUnityLogLock())
            {
                GameLogger.WriteLog(type == LogType.Exception ?
                                    GameLogger.LogType.Error : (GameLogger.LogType)type, "Unity", message + "\n" + stackTrace);
                UpdateLogCount();

                if (type == LogType.Assert || type == LogType.Error || type == LogType.Exception)
                {
                    ShowExceptionDialog("发生错误", message + "\n" + stackTrace, type);
                }
            }
        }
Пример #2
0
        /// <summary>
        /// PRIVATE: Retrieves the user information from GCLogin DB
        /// </summary>
        /// <param name="email">email of user</param>
        /// <param name="returnResponse">out GetItemResponse</param>
        /// <returns>0 if successful, otherwise > 0</returns>
        private int GetUserLoginInfo(string email, out GetItemResponse returnResponse)
        {
            // Gets the user's login information from GCLogin Table and sets it in returnResponse
            int response = dbManager.GetItem(primaryKey, email, TABLE, out returnResponse);

            // Checks the error response
            switch (response)
            {
            // Success
            case (int)DBEnum.DBResponseCodes.SUCCESS:
                logger.WriteLog(GameLogger.LogLevel.Debug, string.Format("Successfully retrieved email: {0} data from table: {1}", email, TABLE));
                break;

            // User Does Not Exist
            case (int)DBEnum.DBResponseCodes.DOES_NOT_EXIST:
                logger.WriteLog(GameLogger.LogLevel.Warning, string.Format("Email: {0} in table: {1} does not exist.", email, TABLE));
                break;

            case (int)DBEnum.DBResponseCodes.DYNAMODB_EXCEPTION:
                logger.WriteLog(GameLogger.LogLevel.Error, string.Format("DynamoDB Exception Error when fetching email {0} in table: {1}", email, TABLE));
                break;
            }

            return(response);
        }