using System;
int x = 5;
int y = 0;
try
{
int z = x / y;
}
catch (Exception ex)
throw new ArithmeticException("Arithmetic exception", ex);
Console.WriteLine(ex.Message);
Console.WriteLine(ex.InnerException.Message);