Catch bad lexical cast in main function.