Exemple #1
0
 public int Divide(int n1, int n2)
 {
     try
     {
         return n1 / n2;
     }
     catch (DivideByZeroException)
     {
         MathFault mf = new MathFault();
         mf.Operation = "division";
         mf.ProblemType = "divide by zero";
         throw new FaultException<MathFault>(mf);
     }
 }