More robust promise exception handling.