Solution to Factorial(Exception Handling) Exercise