Deveel.Data.SystemErrorCodes.GetErrorCode C# (CSharp) Method

GetErrorCode() public static method

public static GetErrorCode ( string errorName ) : int
errorName string
return int
        public static int GetErrorCode(string errorName)
        {
            int value;
            if (!ErrorNameMap.TryGetValue(errorName, out value))
                throw new InvalidOperationException(String.Format("Error '{0}' was not defined.", errorName));

            return value;
        }