Replaced Alerts With Throws

Throws can be caught and handled by the user to handle behavior more explicitly where as alerts don't offer this flexibility.