Rhino.Kit.InitCause C# (CSharp) Method

InitCause() public static method

If initCause methods exists in Throwable, call ex.initCause(cause) or otherwise do nothing.
If initCause methods exists in Throwable, call ex.initCause(cause) or otherwise do nothing.
public static InitCause ( Exception ex, Exception cause ) : Exception
ex System.Exception
cause System.Exception
return System.Exception
		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;
		}