exceptions in factroial class