Modify the nightly test driver.

The self-defined exceptions can be handled there.