add exceptionCaught to handle the case when pipeline is not fully
initialized.