Rescue exceptions while handling commands.