Esempio n. 1
0
 public static void SetMessage(Exception cause, string message)
 {
     try
     {
         _throwableMessageField.set(cause, message);
     }
     catch (Exception e) when(e is System.ArgumentException || e is IllegalAccessException)
     {
         throw new Exception(e);
     }
 }
Esempio n. 2
0
 private void UpdateWirePayloadSuid(ObjectStreamClass wirePayload)
 {
     try
     {
         System.Reflection.FieldInfo field = GetAccessibleSuidField(wirePayload);
         field.set(wirePayload, _versionMapper.mappingFor(wirePayload.Name));
     }
     catch (Exception e) when(e is NoSuchFieldException || e is IllegalAccessException)
     {
         throw new Exception(e);
     }
 }