/*Can choose any length pin*/ public void EditPin(string newPin, int index) { DataStruct p = db.GetPersonByIndex(index); try { p.setPin(UInt32.Parse(newPin)); } catch (FormatException ex)//if the userinputs words not numbers { Log("Message: " + ex.Message + "Stack Trace: " + ex.StackTrace); throw new FaultException <ExceptionDetail>(new ExceptionDetail(ex)); } catch (OverflowException ex)//If too big { Log("Message: " + ex.Message + "Stack Trace: " + ex.StackTrace); throw new FaultException <ExceptionDetail>(new ExceptionDetail(ex)); } }