예제 #1
0
 private void DumpErrorObject(ITransaction transaction, FSTIError fstiErrorObject)
 {
     listResult.Items.Add("Transaction Error:");
     logtxt("Transaction Error:");
     listResult.Items.Add("");
     logtxt("");
     listResult.Items.Add(String.Format("Transaction: {0}", transaction.Name));
     logtxt(String.Format("Transaction: {0}", transaction.Name));
     listResult.Items.Add(String.Format("Description: {0}", fstiErrorObject.Description));
     logtxt(String.Format("Description: {0}", fstiErrorObject.Description));
     listResult.Items.Add(String.Format("MessageFound: {0} ", fstiErrorObject.MessageFound));
     logtxt(String.Format("MessageFound: {0} ", fstiErrorObject.MessageFound));
     listResult.Items.Add(String.Format("MessageID: {0} ", fstiErrorObject.MessageID));
     logtxt(String.Format("MessageID: {0} ", fstiErrorObject.MessageID));
     listResult.Items.Add(String.Format("MessageSource: {0} ", fstiErrorObject.MessageSource));
     logtxt(String.Format("MessageSource: {0} ", fstiErrorObject.MessageSource));
     listResult.Items.Add(String.Format("Number: {0} ", fstiErrorObject.Number));
     logtxt(String.Format("Number: {0} ", fstiErrorObject.Number));
     listResult.Items.Add(String.Format("Fields in Error: {0} ", fstiErrorObject.NumberOfFieldsInError));
     logtxt(String.Format("Fields in Error: {0} ", fstiErrorObject.NumberOfFieldsInError));
     for (int i = 0; i < fstiErrorObject.NumberOfFieldsInError; i++)
     {
         int field = fstiErrorObject.GetFieldNumber(i);
         listResult.Items.Add(String.Format("Field[{0}]: {1}", i, field));
         logtxt(String.Format("Field[{0}]: {1}", i, field));
         ITransactionField myField = transaction.get_Field(field);
         listResult.Items.Add(String.Format("Field name: {0}", myField.Name));
         logtxt(String.Format("Field name: {0}", myField.Name));
     }
 }
예제 #2
0
 private void DumpErrorObject(ITransaction transaction, FSTIError fstiErrorObject)
 {
     DetailError.Clear();
     try
     {
         DetailError.Add("Transaction Error:");
         DetailError.Add("");
         DetailError.Add("Transaction: " + transaction.Name);
         DetailError.Add("Description: " + fstiErrorObject.Description);
         DetailError.Add("MessageFound: " + fstiErrorObject.MessageFound);
         DetailError.Add("MessageID: " + fstiErrorObject.MessageID);
         DetailError.Add("MessageSource: " + fstiErrorObject.MessageSource);
         DetailError.Add("Number: " + fstiErrorObject.Number);
         DetailError.Add("Fields in Error: " + fstiErrorObject.NumberOfFieldsInError);
         for (int i = 0; i < fstiErrorObject.NumberOfFieldsInError; i++)
         {
             int field = fstiErrorObject.GetFieldNumber(i);
             DetailError.Add("Field[" + i.ToString() + "]: " + field);
             ITransactionField myField = transaction.get_Field(field);
             DetailError.Add("Field name: " + myField.Name);
         }
     }
     catch (Exception ex)
     {
         DetailError.Clear();
         DetailError.Add("Transaction Error description: " + _fstiClient.TransactionError);
         DetailError.Add("Detailed Error Exeption: " + ex.Message);
     }
 }
예제 #3
0
        public string[] DumpError(ITransaction transaction, FSTIError fstiErrorObject)
        {
            List <string> errorLog = new List <string>();

            errorLog.Add("Transaction Error:");
            errorLog.Add("");
            errorLog.Add(String.Format("Transaction: {0}", transaction.Name));
            errorLog.Add(String.Format("Description: {0}", fstiErrorObject.Description));
            errorLog.Add(String.Format("MessageFound: {0} ", fstiErrorObject.MessageFound));
            errorLog.Add(String.Format("MessageID: {0} ", fstiErrorObject.MessageID));
            errorLog.Add(String.Format("MessageSource: {0} ", fstiErrorObject.MessageSource));
            errorLog.Add(String.Format("Number: {0} ", fstiErrorObject.Number));
            errorLog.Add(String.Format("Fields in Error: {0} ", fstiErrorObject.NumberOfFieldsInError));
            for (int i = 0; i < fstiErrorObject.NumberOfFieldsInError; i++)
            {
                int field = fstiErrorObject.GetFieldNumber(i);
                errorLog.Add(String.Format("Field[{0}]: {1}", i, field));
                ITransactionField myField = transaction.get_Field(field);
                errorLog.Add(String.Format("Field name: {0}", myField.Name));
            }
            return(errorLog.ToArray());
        }