Ejemplo n.º 1
0
        /*Can choose any length acc num*/
        public void EditAccount(string newAcc, int index)
        {
            DataStruct p = db.GetPersonByIndex(index);

            try
            {
                p.setAcctNo(UInt32.Parse(newAcc));
            }
            catch (FormatException ex)
            {
                Log("Message: " + ex.Message + "Stack Trace: " + ex.StackTrace);     //Logging to a data tier log file
                throw new FaultException <ExceptionDetail>(new ExceptionDetail(ex)); //caught later
            }
            catch (OverflowException ex)
            {
                Log("Message: " + ex.Message + "Stack Trace: " + ex.StackTrace);     //logging to a data tier log file not business tier
                throw new FaultException <ExceptionDetail>(new ExceptionDetail(ex)); //caught by caller
            }
        }