예제 #1
0
        /// <summary>
        /// Log an specific error if it exists in response
        /// </summary>
        /// <param name="errorCode">errorcode for searching</param>
        public void LogAPIError(PostboxAPIErrorCode errorCode)
        {
            PostboxAPIError error = null;

            if (CheckErrorCode(errorCode, out error))
            {
                PostboxLogbook.Instance.Log(error);
            }
        }
예제 #2
0
        /// <summary>
        /// Check if an specific errorcode is in response and get error as return
        /// </summary>
        /// <param name="errorCode">errorcode for searching</param>
        /// <param name="error">the requested APIError</param>
        /// <returns>Boolean for error existens</returns>
        public bool CheckErrorCode(PostboxAPIErrorCode errorCode, out PostboxAPIError error)
        {
            if (Errors.TryGetValue(errorCode, out error))
            {
                return(true);
            }

            return(false);
        }