add exception handling code idea