public static Exception InitCause(Exception ex, Exception cause) { if (Throwable_initCause != null) { object[] args = new object[] { cause }; try { Throwable_initCause.Invoke(ex, args); } catch (Exception) { } } // Ignore any exceptions return ex; }