public string GetMessage(int i,int j) { string k; try { k = (i / j).ToString(); } catch (Exception exp) { MyFaultException theFault = new MyFaultException(); theFault.Reason = "Some Error " + exp.Message.ToString(); //// throw new FaultException<MyFaultException>(theFault); throw new FaultException<MyFaultException>(theFault, new FaultReason(theFault.Reason)); //throw new FaultException(exp.Message); // For throwing General Exception } return k; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)