GetFailReason() public method

public GetFailReason ( ) : FailReason
return FailReason
Ejemplo n.º 1
0
        public void OnRedeemCodeFailed(string response)
        {
            try
            {
                Response answer = new Response(response);

                FailReason failReason = answer.GetFailReason();

                string code = answer.GetFailedCode();
                if (code == null)
                {
                    throw new NullReferenceException("The returned invalid code is null.");
                }

                if (RedeemCodeFailed != null)
                {
                    RedeemCodeFailed(code, failReason, answer.GetCodeErrorInfos());
                }
            }
            catch (Exception e)
            {
                Logger.Error(true, "onRedeemCodeFailed", e);
                if (RedeemCodeFailed != null)
                {
                    RedeemCodeFailed(null, FailReason.UNEXPECTED_ERROR, null);
                }
            }
        }
Ejemplo n.º 2
0
        public void OnRestoreFailed(string response)
        {
            try
            {
                Response answer = new Response(response);

                FailReason failReason = answer.GetFailReason();

                if (RestoreFailed != null)
                {
                    RestoreFailed(failReason);
                }
            }
            catch (Exception e)
            {
                Logger.Error(true, "onRestoreFailed", e);

                if (RestoreFailed != null)
                {
                    RestoreFailed(FailReason.UNEXPECTED_ERROR);
                }
            }
        }
Ejemplo n.º 3
0
		// ------------------------------------------------------
		// Callbacks
		
		/**
		 * Batch Bridge internal error
		 */
		void onBridgeFailure(string response)
		{
			try
			{
				Response answer = new Response(response);

				// TODO: treat the error.
				answer.GetFailReason();

			}
			catch(Exception e)
			{
				Logger.Error(true, "onBridgeFailure", e);
			}
		}