Exception handling an less tedious input