示例#1
0
 /// <summary>
 /// What to do if any InitializeCloud request failed.
 /// </summary>
 /// <param name="exceptionError">Request error details under the ExceptionError format.</param>
 private static void InitializeCloud_OnError(ExceptionError exceptionError)
 {
     switch (exceptionError.type)
     {
     // Unhandled error types
     default:
         DebugLogs.LogError(string.Format(ExceptionTools.unhandledErrorFormat, "CloudFeatures", exceptionError));
         break;
     }
 }
示例#2
0
        /// <summary>
        /// What to do if any PostTransaction request failed.
        /// </summary>
        /// <param name="exceptionError">Request error details under the ExceptionError format.</param>
        private static void PostTransaction_OnError(ExceptionError exceptionError)
        {
            switch (exceptionError.type)
            {
            // Error type: not initialized Cloud or no logged in gamer
            case ExceptionTools.notLoggedInErrorType:
                // Do whatever...
                break;

            // Unhandled error types
            default:
                DebugLogs.LogError(string.Format(ExceptionTools.unhandledErrorFormat, "TransactionFeatures", exceptionError));
                break;
            }
        }
示例#3
0
        /// <summary>
        /// What to do if any SendResetPasswordEmail request failed.
        /// </summary>
        /// <param name="exceptionError">Request error details under the ExceptionError format.</param>
        private static void SendResetPasswordEmail_OnError(ExceptionError exceptionError)
        {
            switch (exceptionError.type)
            {
            // Error type: not initialized Cloud
            case ExceptionTools.notInitializedCloudErrorType:
                // Do whatever...
                break;

            // Unhandled error types
            default:
                DebugLogs.LogError(string.Format(ExceptionTools.unhandledErrorFormat, "AccountFeatures", exceptionError));
                break;
            }
        }
示例#4
0
        /// <summary>
        /// What to do if any SetGamerRelationship request failed.
        /// </summary>
        /// <param name="exceptionError">Request error details under the ExceptionError format.</param>
        /// <param name="gamerID">Identifier of the gamer with who to change the relationship.</param>
        /// <param name="relationship">Type of relationship to set.</param>
        private static void SetGamerRelationship_OnError(ExceptionError exceptionError, string gamerID, FriendRelationshipStatus relationship)
        {
            switch (exceptionError.type)
            {
            // Error type: not initialized Cloud or no logged in gamer
            case ExceptionTools.notLoggedInErrorType:
                // Do whatever...
                break;

            // Unhandled error types
            default:
                DebugLogs.LogError(string.Format(ExceptionTools.unhandledErrorFormat, "CommunityFeatures", exceptionError));
                break;
            }
        }
示例#5
0
        /// <summary>
        /// What to do if any DisplayCurrencyHistory request failed.
        /// </summary>
        /// <param name="exceptionError">Request error details under the ExceptionError format.</param>
        private static void DisplayCurrencyHistory_OnError(ExceptionError exceptionError)
        {
            switch (exceptionError.type)
            {
            // Error type: not initialized Cloud or no logged in gamer
            case ExceptionTools.notLoggedInErrorType:
                TransactionHandler.Instance.ShowError(ExceptionTools.notLoggedInMessage);
                break;

            // Unhandled error types
            default:
                DebugLogs.LogError(string.Format(ExceptionTools.unhandledErrorFormat, "TransactionFeatures", exceptionError));
                TransactionHandler.Instance.ShowError(ExceptionTools.unhandledErrorMessage);
                break;
            }
        }
        /// <summary>
        /// What to do if any DisplayGamerHighScores request failed.
        /// </summary>
        /// <param name="exceptionError">Request error details under the ExceptionError format.</param>
        /// <param name="noScoreErrorMessage">Error message to display in case of no score to display.</param>
        private static void DisplayGamerHighScores_OnError(ExceptionError exceptionError, string noScoreErrorMessage)
        {
            switch (exceptionError.type)
            {
            // Error type: not initialized Cloud or no logged in gamer
            case ExceptionTools.notLoggedInErrorType:
                LeaderboardHandler.Instance.ShowError(ExceptionTools.notLoggedInMessage);
                break;

            // Unhandled error types
            default:
                DebugLogs.LogError(string.Format(ExceptionTools.unhandledErrorFormat, "LeaderboardFeatures", exceptionError));
                LeaderboardHandler.Instance.ShowError(ExceptionTools.unhandledErrorMessage);
                break;
            }
        }
        /// <summary>
        /// What to do if any DisplayGodchildren request failed.
        /// </summary>
        /// <param name="exceptionError">Request error details under the ExceptionError format.</param>
        private static void DisplayGodchildren_OnError(ExceptionError exceptionError)
        {
            switch (exceptionError.type)
            {
            // Error type: not initialized Cloud or no logged in gamer
            case ExceptionTools.notLoggedInErrorType:
                GodfatherHandler.Instance.ShowError(ExceptionTools.notLoggedInMessage);
                break;

            // Unhandled error types
            default:
                DebugLogs.LogError(string.Format(ExceptionTools.unhandledErrorFormat, "GodfatherFeatures", exceptionError));
                GodfatherHandler.Instance.ShowError(ExceptionTools.unhandledErrorMessage);
                break;
            }
        }
示例#8
0
        /// <summary>
        /// What to do if any FindGamers request failed.
        /// </summary>
        /// <param name="exceptionError">Request error details under the ExceptionError format.</param>
        private static void FindGamers_OnError(ExceptionError exceptionError)
        {
            switch (exceptionError.type)
            {
            // Error type: not initialized Cloud
            case ExceptionTools.notInitializedCloudErrorType:
                CommunityHandler.Instance.ShowError(ExceptionTools.notInitializedCloudMessage);
                break;

            // Unhandled error types
            default:
                DebugLogs.LogError(string.Format(ExceptionTools.unhandledErrorFormat, "CommunityFeatures", exceptionError));
                CommunityHandler.Instance.ShowError(ExceptionTools.unhandledErrorMessage);
                break;
            }
        }
        /// <summary>
        /// What to do if any DisplayPagedScores request failed.
        /// </summary>
        /// <param name="exceptionError">Request error details under the ExceptionError format.</param>
        /// <param name="noScoreErrorMessage">Error message to display in case of no score to display.</param>
        private static void DisplayPagedScores_OnError(ExceptionError exceptionError, string noScoreErrorMessage)
        {
            switch (exceptionError.type)
            {
            // Error type: no gamer ever scored on this leaderboard (board doesn't exist yet)
            case ExceptionTools.missingScoreErrorType:
                LeaderboardHandler.Instance.FillPagedLeaderboardPanel(null, noScoreErrorMessage);
                break;

            // Error type: not initialized Cloud or no logged in gamer
            case ExceptionTools.notLoggedInErrorType:
                LeaderboardHandler.Instance.ShowError(ExceptionTools.notLoggedInMessage);
                break;

            // Unhandled error types
            default:
                DebugLogs.LogError(string.Format(ExceptionTools.unhandledErrorFormat, "LeaderboardFeatures", exceptionError));
                LeaderboardHandler.Instance.ShowError(ExceptionTools.unhandledErrorMessage);
                break;
            }
        }
        /// <summary>
        /// What to do if any DisplayGamerKey request failed.
        /// </summary>
        /// <param name="exceptionError">Request error details under the ExceptionError format.</param>
        private static void DisplayGamerKey_OnError(ExceptionError exceptionError)
        {
            switch (exceptionError.type)
            {
            // Error type: the specified key doesn't exist yet
            case ExceptionTools.keyNotFoundErrorType:
                VFSHandler.Instance.FillVFSPanel(null);
                break;

            // Error type: not initialized Cloud or no logged in gamer
            case ExceptionTools.notLoggedInErrorType:
                VFSHandler.Instance.ShowError(ExceptionTools.notLoggedInMessage);
                break;

            // Unhandled error types
            default:
                DebugLogs.LogError(string.Format(ExceptionTools.unhandledErrorFormat, "GamerVFSFeatures", exceptionError));
                VFSHandler.Instance.ShowError(ExceptionTools.unhandledErrorMessage);
                break;
            }
        }