exception handling factorial done