private static void AddIPException() { var ipException = new IPException(); ChangeIPException(ipException, Configuration.Instance.IPExceptions); Configuration.Instance.IPExceptions.Add(ipException); }
public CDBExceptionHandler(System.Exception i_ExceptionToHandle, IPException.IDBExceptionInterpret i_ExceptionInterpret) { m_Exception = i_ExceptionToHandle; InitErrorMsg(); m_ErrorIndex = i_ExceptionInterpret.getDBErrorIndex(m_Exception); if (m_ErrorIndex == DBErrorIndex.OtherDBException) { setErrorMsg(DBErrorIndex.OtherDBException, "Lỗi sau đây xuất hiện " + m_Exception.Message); } }
private static void ChangeIPException(IPException ipException, Collection <IPException> ipExceptions) { Console.Write("Pattern: "); var pattern = Console.ReadLine(); if (string.IsNullOrEmpty(pattern)) { throw new Exception("Pattern can't be empty"); } ipException.Pattern = pattern; }
private static void DeleteIPException(IPException ipException, Collection <IPException> ipExceptions) { ipExceptions.Remove(ipException); }