Opc.Ua.Com.ComUtils.IsUnknownError C# (CSharp) Méthode

IsUnknownError() public static méthode

Checks if the error for the exception is one of the recognized errors.
public static IsUnknownError ( Exception e ) : bool
e System.Exception
Résultat bool
        public static bool IsUnknownError(Exception e, params int[] knownErrors)
        {
            int error = Marshal.GetHRForException(e);

            if (knownErrors != null)
            {
                for (int ii = 0; ii < knownErrors.Length; ii++)
                {
                    if (knownErrors[ii] == error)
                    {
                        return false;
                    }
                }            
            }

            return true;
        }
		#endregion