Rudimentary exception handling.