Example #1
0
 public static void ThrowOnError(this RfcBapiOutputParameter resultCode)
 {
     if (resultCode.MessageType != Error && resultCode.MessageType != Abort)
     {
         return;
     }
     throw new RfcException(resultCode.ToExceptionMessage());
 }
Example #2
0
        private static string ToExceptionMessage(this RfcBapiOutputParameter s)
        {
            string message    = "";
            var    properties = s.GetType().GetProperties();

            foreach (PropertyInfo propertyInfo in properties)
            {
                message += $"{propertyInfo.Name}:{propertyInfo.GetValue(s)},";
            }
            message += $"MessageTypeDefinition: {ToMessageTypeString(s.MessageType)}";

            return(message);
        }