コード例 #1
0
ファイル: ApiError.cs プロジェクト: SUNYOTECH/FiiiChain-POW
        private static string GetErrorMessage(Exception exception, bool showServerExceptions)
        {
            string message = exception.Message;

            if (showServerExceptions && exception.InnerException != null)
            {
                message += "\tInner Exception: " + ApiError.GetErrorMessage(exception.InnerException, showServerExceptions);
            }
            return(message);
        }
コード例 #2
0
ファイル: ApiError.cs プロジェクト: SUNYOTECH/FiiiChain-POW
 public ApiError(ApiException exception, bool showServerExceptions)
 {
     if (exception == null)
     {
         throw new ArgumentNullException(nameof(exception));
     }
     this.Code    = (int)exception.ErrorCode;
     this.Message = ApiError.GetErrorMessage(exception, showServerExceptions);
     this.Data    = exception.ApiData;
 }