コード例 #1
0
        private static void AddIPException()
        {
            var ipException = new IPException();

            ChangeIPException(ipException, Configuration.Instance.IPExceptions);
            Configuration.Instance.IPExceptions.Add(ipException);
        }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
        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;
        }
コード例 #4
0
 private static void DeleteIPException(IPException ipException, Collection <IPException> ipExceptions)
 {
     ipExceptions.Remove(ipException);
 }